ConsoleInputHandler

Implements \InputHandler

Uses Symfony Console to present questions

author

Michiel Rook [email protected]

package

phing.input

Methods

ConsoleInputHandler constructor.

__construct(resource $inputStream, \Symfony\Component\Console\Output\OutputInterface $output) 

Arguments

$inputStream

resource

$output

\Symfony\Component\Console\Output\OutputInterface

getPrompt

getPrompt(\InputRequest $inputRequest) : string

Arguments

$inputRequest

\InputRequest

Response

string

getQuestion

getQuestion(\InputRequest $inputRequest) : \Symfony\Component\Console\Question\Question

Arguments

$inputRequest

\InputRequest

Response

\Symfony\Component\Console\Question\Question

Handle the request encapsulated in the argument.

handleInput(\InputRequest $request) : void

Precondition: the request.getPrompt will return a non-null value.

Postcondition: request.getInput will return a non-null value, request.isInputValid will return true.

Arguments

$request

\InputRequest

Properties

inputStream

inputStream : resource
var

Type(s)

resource

output

output : \Symfony\Component\Console\Output\OutputInterface
var

Type(s)

\Symfony\Component\Console\Output\OutputInterface