Constants

VERBOSITY_QUIET

VERBOSITY_QUIET = 0

VERBOSITY_NORMAL

VERBOSITY_NORMAL = 1

VERBOSITY_VERBOSE

VERBOSITY_VERBOSE = 2

VERBOSITY_VERY_VERBOSE

VERBOSITY_VERY_VERBOSE = 3

VERBOSITY_DEBUG

VERBOSITY_DEBUG = 4

OUTPUT_NORMAL

OUTPUT_NORMAL = 0

OUTPUT_RAW

OUTPUT_RAW = 1

OUTPUT_PLAIN

OUTPUT_PLAIN = 2

Properties

$styles

$styles : 

Type

$verbosity

$verbosity : 

Type

Methods

__construct()

__construct(  $driver = 'console') 

Parameters

$driver

ask()

ask(\think\console\Input  $input,   $question,   $default = null,   $validator = null) 

Parameters

\think\console\Input $input
$question
$default
$validator

askHidden()

askHidden(\think\console\Input  $input,   $question,   $validator = null) 

Parameters

\think\console\Input $input
$question
$validator

confirm()

confirm(\think\console\Input  $input,   $question,   $default = true) 

Parameters

\think\console\Input $input
$question
$default

choice()

choice(\think\console\Input  $input,   $question, array  $choices,   $default = null) 

{@inheritdoc}

Parameters

\think\console\Input $input
$question
array $choices
$default

newLine()

newLine(integer  $count = 1) 

输出空行

Parameters

integer $count

writeln()

writeln(string  $messages, integer  $type) 

输出信息并换行

Parameters

string $messages
integer $type

write()

write(string  $messages, boolean  $newline = false, integer  $type) 

输出信息

Parameters

string $messages
boolean $newline
integer $type

renderException()

renderException(\Throwable  $e) 

Parameters

\Throwable $e

setVerbosity()

setVerbosity(integer  $level) 

设置输出信息级别

Parameters

integer $level

输出信息级别

getVerbosity()

getVerbosity() : integer

获取输出信息级别

Returns

integer

isQuiet()

isQuiet() 

isVerbose()

isVerbose() 

isVeryVerbose()

isVeryVerbose() 

isDebug()

isDebug() 

describe()

describe(  $object, array  $options = array()) 

Parameters

$object
array $options

__call()

__call(  $method,   $args) 

Parameters

$method
$args

setDecorated()

setDecorated(mixed  $decorated) : void

Parameters

mixed $decorated

fetch()

fetch() : string

Returns

string

info()

info(mixed  $message) : void

Parameters

mixed $message

error()

error(mixed  $message) : void

Parameters

mixed $message

comment()

comment(mixed  $message) : void

Parameters

mixed $message

warning()

warning(mixed  $message) : void

Parameters

mixed $message

highlight()

highlight(mixed  $message) : void

Parameters

mixed $message

question()

question(mixed  $message) : void

Parameters

mixed $message

block()

block(\think\console\string  $style, \think\console\string  $message) 

Parameters

\think\console\string $style
\think\console\string $message