write() write( $messages, $nl = true, $quit = false, array $opts = array()) Parameters $messages $nl $quit array $opts
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
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
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
__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
__construct() __construct(null|resource $outputStream = null) Output constructor. Parameters null|resource $outputStream
stopBuffer() stopBuffer(boolean $flush = true, boolean $nl = false, boolean $quit = false, array $opts = array()) stop buffering and flush buffer text Parameters boolean $flush boolean $nl boolean $quit array $opts
flush() flush(boolean $nl = false, boolean $quit = false, array $opts = array()) stop buffering and flush buffer text Parameters boolean $nl boolean $quit array $opts
read() read(string $question = '', boolean $nl = false) : string Read input information Parameters string $question 若不为空,则先输出文本 boolean $nl true 会添加换行符 false 原样输出,不添加换行符 Returns string
stderr() stderr(string $text = '', boolean $nl = true) : integer Write a message to standard error output stream. Parameters string $text boolean $nl True (default) to append a new line at the end of the output string. Returns integer
setOutputStream() setOutputStream( $outStream) : $this setOutStream Parameters $outStream Returns $this
setErrorStream() setErrorStream( $errorStream) : $this Method to set property errorStream Parameters $errorStream Returns $this