PHP Classes

PHP CLI: Process console parameters with callback functions

Recommend this page to a friend!
  Info   View files Example   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2022-09-23 (2 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 36 All time: 10,547 This week: 82Up
Version License PHP version Categories
php-cli 1.0MIT/X Consortium ...5PHP 5, Console
Description Author

This package can process console parameters with callback functions.

It can register callback functions associated with names of parameters that can be passed to the current PHP script when run from the command line console shell.

The package can process the parameters and invoke the callback function associated with the parameter value passed to the current script.

It also provides classes that can output colored text to the console terminal and read data from the standard input.

Picture of Mateo
  Performance   Level  
Name: Mateo <contact>
Classes: 13 packages by
Country: Peru Peru
Innovation award
Innovation award
Nominee: 4x

Details

Cli apps

Installation

composer require mateodioev/php-easy-cli

Usage

$app = new \Mateodioev\PhpEasyCli\App();

$app->register('help', function() use ($app) {
    $app->getPrinter()->display('Default command is help!!');
});

$app->run($argv, 'help');
  Files folder image Files  
File Role Description
Files folder imagesrc (3 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file readme.MD Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file App.php Class Class source
  Plain text file Color.php Class Class source
  Plain text file Printer.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:36
This week:0
All time:10,547
This week:82Up