handmade-medium/console-progress-bar
Composer 安装命令:
composer require handmade-medium/console-progress-bar
包简介
PHP Console Progress Bar
README 文档
README
Provides a progress bar for console applications
- ConsoleProgressBar = Generic PHP Cli Progress Bar
- DrushProgressBar = Customized for use in a Drush console application
Usage
// width of the left title column $colWidth = 50;
// size of bar $size = ConsoleProgressBar::SIZE_MEDIUM;
// max value of loop $max = 100;
// text for column $text = "Test";
// init $progressBar = new ConsoleProgressBar($max, $size, $text, $colWidth);
// loop for($x=1;$x<=$max;$x++) { $progressBar->showProgress($x); }
// end $progressBar->showComplete();
Examples
see examples/consoleExample.php
> php examples/consoleExample.php
Example Spinner [X] 100% Example Small Bar [=========================] 100% Example Medium Bar [==================================================] 100% Example Large Bar [====================================================================================================] 100% Custom Bar [##################################################] 100% Custom Spinner [X] 100%
v1.0.2
- Added Tests for Drush 6 .. 8
- Added Test for Console
- Added Custom bar and Custom Spinner options
- Fixed Large Bar bug - do not exceed viewport width
v1.0
- Initial Release
统计信息
- 总下载量: 30
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2017-05-02