Zend Framework  3.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
AbstractPrompt Class Reference

Public Member Functions

 getLastResponse ()
 Return last answer to this prompt.
 
 getConsole ()
 Return console adapter to use when showing prompt.
 
 setConsole (ConsoleAdapter $adapter)
 Set console adapter to use when showing prompt.
 
- Public Member Functions inherited from PromptInterface
 show ()
 Show the prompt to user and return the answer.
 

Static Public Member Functions

static prompt ()
 Create an instance of this prompt, show it and return response.
 

Protected Attributes

 $console
 
 $lastResponse
 

Member Function Documentation

getConsole ( )

Return console adapter to use when showing prompt.

Returns
ConsoleAdapter

Implements PromptInterface.

getLastResponse ( )

Return last answer to this prompt.

Returns
mixed

Implements PromptInterface.

static prompt ( )
static

Create an instance of this prompt, show it and return response.

This is a convenience method for creating statically creating prompts, i.e.:

$name = Zend::prompt("Enter your name: ");

Returns
mixed
Exceptions
Exception\BadMethodCallException
setConsole ( ConsoleAdapter  $adapter)

Set console adapter to use when showing prompt.

Parameters
ConsoleAdapter$adapter

Implements PromptInterface.

Member Data Documentation

$console
protected
$lastResponse
protected