robotdance/php-console
Composer 安装命令:
composer require robotdance/php-console
包简介
Utilities for console output and text animations
README 文档
README
PHP-Console is an utility class for console output and text animations.
Animations (new!)
You can produce ASC Art animations using a simple sprite structure and animate them in your console output.
use robotdance/Sprite; ... $spr = new Sprite('./sprites/blinking_programmer.spr'); echo $spr->animate(); }
That will produce a programmer blinking his eyes in front of the computer:
The sprite files are easy to build. A fast hack into the example vim sprites/blinking_programmer.spr and the sprite class vim src/Sprite.php will show you how to make your own animations. Have fun!
Ansi color output examples
use robotdance/Console; ... echo Console::red('Bob is going home'); // red text echo Console::apply('Bob is going home', ['red', 'bold']); // red and bold text echo Console::indent('Bob is going home', 4, 2); two levels of identation }
Please take a look at the source comments and generate docs through PHPDocumentor to learn more.
Setup
PHP-Console uses Composer as dependency manager.
$ composer install
You may also generate documentation:
$ ./bin/phpdoc -d ./src/ -t ./docs/
Testing
$ ./bin/phpunit
Contribute
Fork, code your tests and modifications, write a good commit message and submit a pull request. All tests must pass and the coverage must remains at 100%.
统计信息
- 总下载量: 62
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-06-02