Properties

$helperSet

$helperSet : 

Type

$inputStream

$inputStream : 

Type

$shell

$shell : 

Type

$stty

$stty : 

Type

Methods

ask()

ask(\Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output, \Symfony\Component\Console\Question\Question  $question) : mixed

Asks a question to the user.

Parameters

\Symfony\Component\Console\Input\InputInterface $input
\Symfony\Component\Console\Output\OutputInterface $output
\Symfony\Component\Console\Question\Question $question

Throws

\Symfony\Component\Console\Exception\RuntimeException

If there is no data to read in the input stream

Returns

mixed —

The user answer

getName()

getName() 

{@inheritdoc}

disableStty()

disableStty() 

Prevents usage of stty.

strlen()

strlen(string  $string) : integer

Returns the length of a string, using mb_strwidth if it is available.

Parameters

string $string

The string to check its length

Returns

integer —

The length of the string

substr()

substr(string  $string, integer  $from, integer|null  $length = null) : string

Returns the subset of a string, using mb_substr if it is available.

Parameters

string $string

String to subset

integer $from

Start offset

integer|null $length

Length to read

Returns

string —

The string subset

formatTime()

formatTime(  $secs) 

Parameters

$secs

formatMemory()

formatMemory(  $memory) 

Parameters

$memory

doAsk()

doAsk(\Symfony\Component\Console\Output\OutputInterface  $output, \Symfony\Component\Console\Question\Question  $question) : boolean|mixed|string|null

Asks the question to the user.

Parameters

\Symfony\Component\Console\Output\OutputInterface $output
\Symfony\Component\Console\Question\Question $question

Throws

\Symfony\Component\Console\Exception\RuntimeException

In case the fallback is deactivated and the response cannot be hidden

Returns

boolean|mixed|string|null

getHiddenResponse()

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

Gets a hidden response from user.

Parameters

\Symfony\Component\Console\Output\OutputInterface $output

An Output instance

resource $inputStream

The handler resource

Throws

\Symfony\Component\Console\Exception\RuntimeException

In case the fallback is deactivated and the response cannot be hidden

validateAttempts()

validateAttempts(callable  $interviewer, \Symfony\Component\Console\Output\OutputInterface  $output, \Symfony\Component\Console\Question\Question  $question) : mixed

Validates an attempt.

Parameters

callable $interviewer

A callable that will ask for a question and return the result

\Symfony\Component\Console\Output\OutputInterface $output

An Output instance

\Symfony\Component\Console\Question\Question $question

A Question instance

Throws

\Exception

In case the max number of attempts has been reached and no valid response has been given

Returns

mixed —

The validated response

getShell()

getShell() : string|boolean

Returns a valid unix shell.

Returns

string|boolean —

The valid shell name, false in case no valid shell is found

hasSttyAvailable()

hasSttyAvailable() 

Returns whether Stty is available or not.