phpgames / hal-helper
HAL 9000 Symfony 控制台助手
v1.0.1
2014-12-08 15:10 UTC
Requires
- symfony/console: ~2.5
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is auto-updated.
Last update: 2024-09-20 17:17:11 UTC
README
安装
步骤 1: Composer
将以下行添加到 composer.json
文件中
{ "require": { "phpgames/hal-helper": "~1.0" } }
用法
默认情况下,HAL 标志将居中显示在屏幕上,且不带文字。要自定义输出样式,请更改构造函数参数
标志和文字居中对齐
$hal = new HAL($output); $hal->sayHello();
标志和文字左对齐
$hal = new HAL($output, true, false); $hal->sayHello();
仅标志居中对齐
$hal = new HAL($output, false); $hal->sayHello();
仅标志左对齐
$hal = new HAL($output, false, false); $hal->sayHello();
许可证
在本代码中附带 MIT 许可证发布。