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 | |
| protected int|null | 获取终端宽度 |
| protected int|null | 获取终端高度 |
| array | 获取当前终端的尺寸 |
| protected bool | 当前环境是否支持写入控制台输出到stdout. |
| protected bool | 当前环境是否支持写入控制台输出到stderr. |
| protected void | doWrite(string message, bool newline, null stream) 将消息写入到输出。 |
| protected bool | hasColorSupport($stream stream) 是否支持着色 |
public void __construct(Output output)
public void setDecorated(mixed decorated)
public void write(mixed messages, bool newline, mixed type, mixed stream)
public void renderException(Exception e)
protected int|null getTerminalWidth()
获取终端宽度
protected int|null getTerminalHeight()
获取终端高度
public array getTerminalDimensions()
获取当前终端的尺寸
protected bool hasStdoutSupport()
当前环境是否支持写入控制台输出到stdout.
protected bool hasStderrSupport()
当前环境是否支持写入控制台输出到stderr.
protected void doWrite(string message, bool newline, null stream)
将消息写入到输出。
protected bool hasColorSupport($stream stream)
是否支持着色