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

$message

$message : 

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 = self::OUTPUT_NORMAL) 

输出信息并换行

Parameters

string $messages
integer $type

write()

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

输出信息

Parameters

string $messages
boolean $newline
integer $type

renderException()

renderException(\Exception  $e) 

Parameters

\Exception $e

setVerbosity()

setVerbosity(  $level) 

{@inheritdoc}

Parameters

$level

getVerbosity()

getVerbosity() 

{@inheritdoc}

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

getMessage()

getMessage() 

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(  $style,   $message) 

Parameters

$style
$message