category Zend
package Zend_Console
subpackage Prompt

 Methods

Ask the user for a single key stroke

__construct(string $promptText, string $yesChar, string $noChar) 

Parameters

$promptText

string

The prompt text to display in console

$yesChar

string

The "yes" key (defaults to Y)

$noChar

string

The "no" key (defaults to N)

getAllowEmpty()

getAllowEmpty() : bool
Inherited

inherited_from \Zend\Console\Prompt\Char::getAllowEmpty()

Returns

bool

getAllowedChars()

getAllowedChars() : string
Inherited

inherited_from \Zend\Console\Prompt\Char::getAllowedChars()

Returns

string

Return console adapter to use when showing prompt.

getConsole() : \Zend\Console\Adapter\AdapterInterface
Inherited

inherited_from \Zend\Console\Prompt\AbstractPrompt::getConsole()
inherited_from \Zend\Console\Prompt\Char::getConsole()

Returns

getEcho()

getEcho() : bool
Inherited

inherited_from \Zend\Console\Prompt\Char::getEcho()

Returns

bool

getIgnoreCase()

getIgnoreCase() : bool
Inherited

inherited_from \Zend\Console\Prompt\Char::getIgnoreCase()

Returns

bool

Return last answer to this prompt.

getLastResponse() : mixed
Inherited

inherited_from \Zend\Console\Prompt\AbstractPrompt::getLastResponse()
inherited_from \Zend\Console\Prompt\Char::getLastResponse()

Returns

mixed

getNoChar()

getNoChar() : string

Returns

string

getPromptText()

getPromptText() : string
Inherited

inherited_from \Zend\Console\Prompt\Char::getPromptText()

Returns

string

getYesChar()

getYesChar() : string

Returns

string

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

prompt() : mixed
Inherited

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

 $name = Zend\Console\Prompt\Line::prompt("Enter your name: ");

inherited_from \Zend\Console\Prompt\AbstractPrompt::prompt()
inherited_from \Zend\Console\Prompt\Char::prompt()

Exceptions

\Zend\Console\Exception\BadMethodCallException

Returns

mixed

setAllowEmpty()

setAllowEmpty(bool $allowEmpty) 
Inherited

inherited_from \Zend\Console\Prompt\Char::setAllowEmpty()

Parameters

$allowEmpty

bool

setAllowedChars()

setAllowedChars(string $allowedChars) 
Inherited

inherited_from \Zend\Console\Prompt\Char::setAllowedChars()

Parameters

$allowedChars

string

Set console adapter to use when showing prompt.

setConsole(\Zend\Console\Adapter\AdapterInterface $adapter) 
Inherited

inherited_from \Zend\Console\Prompt\AbstractPrompt::setConsole()
inherited_from \Zend\Console\Prompt\Char::setConsole()

Parameters

setEcho()

setEcho(bool $echo) 
Inherited

inherited_from \Zend\Console\Prompt\Char::setEcho()

Parameters

$echo

bool

setIgnoreCase()

setIgnoreCase(bool $ignoreCase) 
Inherited

inherited_from \Zend\Console\Prompt\Char::setIgnoreCase()

Parameters

$ignoreCase

bool

setNoChar()

setNoChar(string $noChar) 

Parameters

$noChar

string

setPromptText()

setPromptText(string $promptText) 
Inherited

inherited_from \Zend\Console\Prompt\Char::setPromptText()

Parameters

$promptText

string

setYesChar()

setYesChar(string $yesChar) 

Parameters

$yesChar

string

Show the confirmation message and return result.

show() : bool

Returns

bool

 Properties

 

$allowEmpty

$allowEmpty : bool
Inherited

inherited_from \Zend\Console\Prompt\Char::$$allowEmpty
 

$allowedChars

$allowedChars : string

 

$console

$console : \Zend\Console\Adapter\AdapterInterface
Inherited

inherited_from \Zend\Console\Prompt\AbstractPrompt::$$console
inherited_from \Zend\Console\Prompt\Char::$$console
 

$echo

$echo : bool
Inherited

inherited_from \Zend\Console\Prompt\Char::$$echo
 

$ignoreCase

$ignoreCase : bool

 

$lastResponse

$lastResponse : mixed
Inherited

inherited_from \Zend\Console\Prompt\AbstractPrompt::$$lastResponse
inherited_from \Zend\Console\Prompt\Char::$$lastResponse
 

$noChar

$noChar : string

 

$promptText

$promptText : string

 

$yesChar

$yesChar : string