Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
Console Class Reference

Ubiquity\devtools\cmd$Console This class is part of Ubiquity. More...

Static Public Member Functions

static readline ()
 Read a line from the user input.
 
static question ($prompt, array $propositions=null, array $options=[])
 Ask the user a question and return the answer.
 
static yesNoQuestion ($prompt, array $propositions=['yes', 'no'], array $options=[])
 
static explodeResponse (string $response, $callback='trim', string $separator=',')
 
static isYes ($answer)
 Returns true if the answer is yes or y.
 
static isNo ($answer)
 Returns true if the answer is no or n.
 
static isCancel ($answer)
 Returns true if the answer is cancel or z.
 
static reExecute ()
 ReExecutes the loaded script.
 

Detailed Description

Ubiquity\devtools\cmd$Console This class is part of Ubiquity.

Author
jc
Version
1.0.0

Definition at line 12 of file Console.php.

Member Function Documentation

◆ explodeResponse()

static explodeResponse ( string  $response,
  $callback = 'trim',
string  $separator = ',' 
)
static

Definition at line 86 of file Console.php.

◆ isCancel()

static isCancel (   $answer)
static

Returns true if the answer is cancel or z.

Parameters
string$answer
Returns
boolean

Definition at line 122 of file Console.php.

◆ isNo()

static isNo (   $answer)
static

Returns true if the answer is no or n.

Parameters
string$answer
Returns
boolean

Definition at line 109 of file Console.php.

◆ isYes()

static isYes (   $answer)
static

Returns true if the answer is yes or y.

Parameters
string$answer
Returns
boolean

Definition at line 96 of file Console.php.

◆ question()

static question (   $prompt,
array  $propositions = null,
array  $options = [] 
)
static

Ask the user a question and return the answer.

Parameters
string$prompt
?array$propositions
Returns
string

Definition at line 30 of file Console.php.

◆ readline()

static readline ( )
static

Read a line from the user input.

Returns
string

Definition at line 19 of file Console.php.

◆ reExecute()

static reExecute ( )
static

ReExecutes the loaded script.

Returns
void

Definition at line 133 of file Console.php.

◆ yesNoQuestion()

static yesNoQuestion (   $prompt,
array  $propositions = [ 'yes', 'no' ],
array  $options = [] 
)
static

Definition at line 73 of file Console.php.


The documentation for this class was generated from the following file: