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

$verbosity

$verbosity

$handle

$handle : \think\console\output\driver\Buffer|\think\console\output\driver\Console|\think\console\output\driver\Nothing

Type

Nothing

Methods

__construct()

__construct(mixed  $driver = 'console') : mixed

Parameters

mixed $driver

Returns

mixed —

ask()

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

Parameters

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

Returns

mixed —

askHidden()

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

Parameters

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

Returns

mixed —

confirm()

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

Parameters

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

Returns

mixed —

choice()

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

{@inheritdoc}

Parameters

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

Returns

mixed —

newLine()

newLine(int  $count = 1) : mixed

输出空行

Parameters

int $count

Returns

mixed —

writeln()

writeln(string  $messages, int  $type = self::OUTPUT_NORMAL) : mixed

输出信息并换行

Parameters

string $messages
int $type

Returns

mixed —

write()

write(string  $messages, bool  $newline = false, int  $type = self::OUTPUT_NORMAL) : mixed

输出信息

Parameters

string $messages
bool $newline
int $type

Returns

mixed —

renderException()

renderException(\Exception  $e) : mixed

Parameters

\Exception $e

Returns

mixed —

setVerbosity()

setVerbosity(mixed  $level) : mixed

{@inheritdoc}

Parameters

mixed $level

Returns

mixed —

getVerbosity()

getVerbosity() : mixed

{@inheritdoc}

Returns

mixed —

isQuiet()

isQuiet() : mixed

Returns

mixed —

isVerbose()

isVerbose() : mixed

Returns

mixed —

isVeryVerbose()

isVeryVerbose() : mixed

Returns

mixed —

isDebug()

isDebug() : mixed

Returns

mixed —

describe()

describe(mixed  $object, array  $options = []) : mixed

Parameters

mixed $object
array $options

Returns

mixed —

__call()

__call(mixed  $method, mixed  $args) : mixed

Parameters

mixed $method
mixed $args

Returns

mixed —

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

askQuestion()

askQuestion(\think\console\Input  $input, \think\console\output\Question  $question) : mixed

Parameters

\think\console\Input $input
\think\console\output\Question $question

Returns

mixed —

block()

block(mixed  $style, mixed  $message) : mixed

Parameters

mixed $style
mixed $message

Returns

mixed —