interface InterfaceCli

Interface InterfaceWriter

For use as our WP_CLI Interface

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($text)

Get a user 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 64
warning(string $text)

Logs a warning message

Parameters

string $text

at line 73
success(string $text)

Logs a success message

Parameters

string $text

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

Logs an error

Parameters

string $text
bool $exit

at line 94
string getResponse($text)

Get a user response

Parameters

$text

Return Value

string

at line 105
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