class Cli implements InterfaceCli

Class Cli

Methods

log(string $text)

Logs a message

warning(string $text)

Logs a warning message

success(string $text)

Logs a success message

error(string $text, bool $exit = true)

Logs an error

string
getResponse(string $question)

Ask the CLI user a question and return their response

outputInFormat(string $format, array $data, array $keys)

Output the data in a specific format

Details

at line 55
log(string $text)

Logs a message

Parameters

string $text

at line 66
warning(string $text)

Logs a warning message

Parameters

string $text

at line 77
success(string $text)

Logs a success message

Parameters

string $text

at line 90
error(string $text, bool $exit = true)

Logs an error

Parameters

string $text
bool $exit

Exceptions

ExitException

at line 103
string getResponse(string $question)

Ask the CLI user a question and return their response

Parameters

string $question

Return Value

string

at line 117
outputInFormat(string $format, array $data, array $keys)

Output the data in a specific format

Parameters

string $format Either 'table', 'json', 'csv' or 'yaml'
array $data In the format [ [ 'Key' => 'Value' ], [ 'Key' => 'Value' ] ]
array $keys The Keys used in $data