phpgames/hal-helper

HAL 9000 Symfony 控制台助手

v1.0.1 2014-12-08 15:10 UTC

This package is auto-updated.

Last update: 2024-09-20 17:17:11 UTC


README

Build Status Latest Stable Version SensioLabsInsight

安装

步骤 1: Composer

将以下行添加到 composer.json 文件中

{
    "require": {
        "phpgames/hal-helper": "~1.0"
    }
}

用法

默认情况下,HAL 标志将居中显示在屏幕上,且不带文字。要自定义输出样式,请更改构造函数参数

标志和文字居中对齐

$hal = new HAL($output);
$hal->sayHello();

Logo and text align center

标志和文字左对齐

$hal = new HAL($output, true, false);
$hal->sayHello();

Logo and text align left

仅标志居中对齐

$hal = new HAL($output, false);
$hal->sayHello();

Only logo align center

仅标志左对齐

$hal = new HAL($output, false, false);
$hal->sayHello();

Only logo align left

许可证

在本代码中附带 MIT 许可证发布。