Methods

write()

write(  $messages,   $nl = true,   $quit = false, array  $opts = array()) 

Parameters

$messages
$nl
$quit
array $opts

writef()

writef(string  $format, mixed  ...$args) 

Parameters

string $format
mixed $args variadic

printf()

printf(string  $format, mixed  ...$args) 

Parameters

string $format
mixed $args variadic

writeln()

writeln(string|mixed  $text, boolean  $quit = false, array  $opts = array()) : integer

Parameters

string|mixed $text
boolean $quit
array $opts

Returns

integer

println()

println(string|mixed  $text, boolean  $quit = false, array  $opts = array()) : integer

Parameters

string|mixed $text
boolean $quit
array $opts

Returns

integer

writeRaw()

writeRaw(string|mixed  $text, boolean  $nl = true, boolean  $quit = false, array  $opts = array()) : integer

Parameters

string|mixed $text
boolean $nl
boolean $quit
array $opts

Returns

integer

colored()

colored(string  $text, string  $tag = 'info') : integer

Parameters

string $text
string $tag

Returns

integer

block()

block(array|mixed  $messages, string  $type = 'MESSAGE', string  $style = \Toolkit\Cli\Style::NORMAL, boolean  $quit = false) : integer

Parameters

array|mixed $messages
string $type
string $style
boolean $quit

Returns

integer

liteBlock()

liteBlock(array|mixed  $messages, string  $type = 'MESSAGE', string  $style = \Toolkit\Cli\Style::NORMAL, boolean  $quit = false) : integer

Parameters

array|mixed $messages
string $type
string $style
boolean $quit

Returns

integer

title()

title(string  $title, array  $opts = array()) 

Parameters

string $title
array $opts

section()

section(string  $title, string|array  $body, array  $opts = array()) 

Parameters

string $title
string|array $body

The section body message

array $opts

aList()

aList(array|mixed  $data, string  $title = 'Information', array  $opts = array()) 

Parameters

array|mixed $data
string $title
array $opts

multiList()

multiList(array  $data, array  $opts = array()) 

Parameters

array $data
array $opts

mList()

mList(array  $data, array  $opts = array()) 

Parameters

array $data
array $opts

helpPanel()

helpPanel(array  $config) 

Parameters

array $config

panel()

panel(array  $data, string  $title = 'Information panel', array  $opts = array()) 

Parameters

array $data
string $title
array $opts

table()

table(array  $data, string  $title = 'Data Table', array  $opts = array()) 

Parameters

array $data
string $title
array $opts

progressTxt()

progressTxt(integer  $total, string  $msg, string  $doneMsg = '') : \Generator

Parameters

integer $total
string $msg
string $doneMsg

Returns

\Generator

progressBar()

progressBar(  $total, array  $opts = array()) 

Parameters

$total
array $opts

__call()

__call(string  $method, array  $args = array()) : integer

Parameters

string $method
array $args

Throws

\LogicException

Returns

integer

json()

json(mixed  $data, boolean  $echo = true, integer  $flags = JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) : integer|string

Parameters

mixed $data
boolean $echo
integer $flags

Returns

integer|string

dump()

dump(mixed  ...$vars) 

Parameters

mixed $vars variadic

prints()

prints(mixed  ...$vars) 

Parameters

mixed $vars variadic

info()

info() 

note()

note() 

notice()

notice() 

success()

success() 

primary()

primary() 

warning()

warning() 

danger()

danger() 

error()

error() 

liteInfo()

liteInfo() 

liteNote()

liteNote() 

liteNotice()

liteNotice() 

liteSuccess()

liteSuccess() 

litePrimary()

litePrimary() 

liteWarning()

liteWarning() 

liteDanger()

liteDanger() 

liteError()

liteError() 

padding()

padding() 

splitLine()

splitLine() 

spinner()

spinner() 

loading()

loading() 

pending()

pending() 

pointing()

pointing() 

counterTxt()

counterTxt() 

confirm()

confirm() 

: bool

unConfirm()

unConfirm() 

: bool

select()

select() 

: string

checkbox()

checkbox() 

: array

ask()

ask() 

: string

askPassword()

askPassword() 

: string