PHP Classes

CLI Parser: Parse and extract arguments from the command line

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 48%Total: 867 All time: 4,046 This week: 57Up
Version License PHP version Categories
cliparser 1.0GNU General Publi...5PHP 5, Text processing, Console, Parsers
Description 

Author

This package can be used to parse and extract the values of arguments passed to a PHP script when it is executed from the command line.

There are several classes that can parse and validate arguments of several types like: boolean switches, strings, numbers, files and directory names.

The main class can use objects of the configured argument types classes to validate and extract the argument values. It can also present an usage help messages.

Picture of Diego Feitosa
Name: Diego Feitosa <contact>
Classes: 5 packages by
Country: Brazil Brazil
Age: 38
All time rank: 40232 in Brazil Brazil
Week rank: 164 Up12 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files (10)  
File Role Description
Plain text file CliParser.inc Class Abstract class with the interpreter definition
Plain text file CliToken.inc Class Abstract class wich describes the tokens
Plain text file CliTokenArray.inc Class Concrete class that accepts many arguments and returns an array
Plain text file CliTokenBoolean.inc Class Concrete class that accepts no arguments and returns an boolean value
Plain text file CliTokenDirectory.inc Class Concrete class that accepts a directory as argument
Plain text file CliTokenFile.inc Class Concrete class that accepts a path of file as argument
Plain text file CliTokenNumeric.inc Class Concrete class that accepts a numeric value as argument
Plain text file CliTokenString.inc Class Concrete class that accepts a string as argument
Plain text file CliTokenExample.inc Class Example of how to implement your own kind of token
Accessible without login Plain text file example.php Example Example

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:867
This week:0
All time:4,046
This week:57Up
User Ratings User Comments (1)
 All time
Utility:66%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:48%StarStarStar
Rank:2978
 
Excellent
15 years ago (kishore kumar)
70%StarStarStarStar