2017 © Pedro Peláez
 

library php-cli-tools

A collection of tools to help with command line development in PHP 5.3

image

thesmart/php-cli-tools

A collection of tools to help with command line development in PHP 5.3

  • Tuesday, August 7, 2012
  • by thesmart
  • Repository
  • 1 Watchers
  • 2 Stars
  • 1,089 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 95 Forks
  • 0 Open issues
  • 3 Versions
  • 8 % Grown

The README.md

PHP Command Line Tools

A collection of functions and classes to assist with command line development., (*1)

Requirements, (*2)

  • PHP >= 5.3

Function List

  • \cli\out($msg, ...)
  • \cli\out_padded($msg, ...)
  • \cli\err($msg, ...)
  • \cli\line($msg = '', ...)
  • \cli\input()
  • \cli\prompt($question, $default = false, $marker = ':')
  • \cli\choose($question, $choices = 'yn', $default = 'n')
  • \cli\menu($items, $default = false, $title = 'Choose an Item')

Progress Indicators

  • \cli\notifier\Dots($msg, $dots = 3, $interval = 100)
  • \cli\notifier\Spinner($msg, $interval = 100)
  • \cli\progress\Bar($msg, $total, $interval = 100)

Tabular Display

  • \cli\Table::__construct(array $headers = null, array $rows = null)
  • \cli\Table::setHeaders(array $headers)
  • \cli\Table::setRows(array $rows)
  • \cli\Table::addRow(array $row)
  • \cli\Table::sort($column)
  • \cli\Table::display()

Usage

See example.php for examples., (*3)

Todo

  • Expand this README
  • Add doc blocks to rest of code

The Versions

07/08 2012

dev-master

9999999-dev https://github.com/thesmart/php-cli-tools

A collection of tools to help with command line development in PHP 5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

cli command line tabs stdout prompt progress bar

07/08 2012

v1.1

1.1.0.0 https://github.com/thesmart/php-cli-tools

A collection of tools to help with command line development in PHP 5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

cli command line tabs stdout prompt progress bar

07/08 2012

v1.0

1.0.0.0 https://github.com/thesmart/php-cli-tools

A collection of tools to help with command line development in PHP 5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

cli command line tabs stdout prompt progress bar