ThinkPHP5


think\console\output\driver\Console
library\think\console\output\driver\Console.php at line 17

Class Console

Console

public class Console


Constructor Summary
void

__construct(Output output)

Method Summary
void

setDecorated(mixed decorated)

void

write(mixed messages, bool newline, mixed type, mixed stream)

void

renderException(Exception e)

protected int|null

getTerminalWidth()

获取终端宽度

protected int|null

getTerminalHeight()

获取终端高度

array

getTerminalDimensions()

获取当前终端的尺寸

protected bool

hasStdoutSupport()

当前环境是否支持写入控制台输出到stdout.

protected bool

hasStderrSupport()

当前环境是否支持写入控制台输出到stderr.

protected void

doWrite(string message, bool newline, null stream)

将消息写入到输出。

protected bool

hasColorSupport($stream stream)

是否支持着色

Constructor Detail

library\think\console\output\driver\Console.php at line 31

__construct

public void __construct(Output output)

Method Detail

library\think\console\output\driver\Console.php at line 40

setDecorated

public void setDecorated(mixed decorated)

library\think\console\output\driver\Console.php at line 45

write

public void write(mixed messages, bool newline, mixed type, mixed stream)

library\think\console\output\driver\Console.php at line 71

renderException

public void renderException(Exception e)

library\think\console\output\driver\Console.php at line 143

getTerminalWidth

protected int|null getTerminalWidth()

获取终端宽度


library\think\console\output\driver\Console.php at line 154

getTerminalHeight

protected int|null getTerminalHeight()

获取终端高度


library\think\console\output\driver\Console.php at line 165

getTerminalDimensions

public array getTerminalDimensions()

获取当前终端的尺寸


library\think\console\output\driver\Console.php at line 298

hasStdoutSupport

protected bool hasStdoutSupport()

当前环境是否支持写入控制台输出到stdout.


library\think\console\output\driver\Console.php at line 308

hasStderrSupport

protected bool hasStderrSupport()

当前环境是否支持写入控制台输出到stderr.


library\think\console\output\driver\Console.php at line 338

doWrite

protected void doWrite(string message, bool newline, null stream)

将消息写入到输出。

Parameters:
message - 消息
newline - 是否另起一行

library\think\console\output\driver\Console.php at line 355

hasColorSupport

protected bool hasColorSupport($stream stream)

是否支持着色


ThinkPHP5