masterklavi/phpprogress 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

masterklavi/phpprogress

Composer 安装命令:

composer require masterklavi/phpprogress

包简介

Here is a PHP function that shows progress in nice view in command-line interface (CLI)

README 文档

README

Using it you can give nice progress view in command-line interface (CLI)

Example

use masterklavi\phpprogress\Progress;

// init progress of 500 tasks
$progress = new Progress(500);

for ($i = 0; $i < 500; $i++)
{
    // some task
    usleep(rand(0, 50000));

    // mark that a task was completed
    $progress->show();
}

Requirements

  • PHP version 5.4.0 or higher

Installation

Using Composer

Get the package:

$ composer require masterklavi/phpprogress

Manual Installation

Clone git repository:

$ git clone https://github.com/masterklavi/phpprogress.git

or download the package at https://github.com/masterklavi/phpprogress/archive/master.zip

Small Documentation

  • Progress::__construct($max) where $max - max value (count of tasks)
  • Progress::show($offset_or_value = 1, $progress_type = Progress::TYPE_OFFSET, $status = Progress::STATUS_OK) where
    • $offset_or_value - offset (when type=OFFSET) or value (when type=VALUE)
    • $progress_type can be Progress::TYPE_OFFSET or Progress::TYPE_VALUE
    • $status can be Progress::STATUS_OK, Progress::STATUS_SKIP or Progress::STATUS_FAIL
$progress = new Progress(10);
$progress->show(); // offset = 1, so value = 1
$progress->show(2); // offset = 2, so value = 3
$progress->show(6, Progress::TYPE_VALUE); // value = 6
$progress->show(4); // offset = 2, so value = 10

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-05-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固