CLI Parser: Parse and extract arguments from the command line

Recommend this page to a friend!
  Info   View files (10)   Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
48%Total: 856 All time: 4,042 This week: 404
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: 34
All time rank: 40233 in Brazil Brazil
Week rank: 762 40 in Brazil Brazil
Innovation award
Innovation award
Nominee: 1x

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

 Version Control Unique User Downloads Download Rankings  
 0%
Total:856
This week:0
All time:4,042
This week:404
User Ratings User Comments (1)
 All time
Utility:66%
Consistency:75%
Documentation:-
Examples:75%
Tests:-
Videos:-
Overall:48%
Rank:2505
 
Excellent
10 years ago (kishore kumar)
70%
 

For more information send a message to info at phpclasses dot org.