Login   Register  
PHP Classes
elePHPant
Icontem

Read arguments: Read and validate shell command line arguments

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   Screenshots Screenshots   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2010-09-30 (3 years ago) RSS 2.0 feedNot enough user ratingsTotal: 277 This week: 1All time: 6,698 This week: 1,410Up
Version License PHP version Categories  
read-cli-arguments 1.0.0BSD License3.0Console, Validation
Description Author  

This class can can be used to read and validate shell command line arguments.

It can parse the values of arguments passed to a PHP script started from a command line shell to validate them according to rules defined by the current script.

It supports mandatory arguments, optional arguments, switch arguments, multiple alternatives to an option switches, and a special argument that makes show a nicely formatted help usage message.

The class extract the argument values into an array if the argument rules are validated.

Picture of Manuel Lemos
Name: Manuel Lemos <contact>
Classes: 38 packages by
Country: Portugal Portugal
Age: 45
All time rank: 1
Week rank: 1 Equal

Screenshots  
  • read-cli-arguments.png
  Files folder image Files  
File Role Description
Plain text file read_arguments.php Class Read arguments class
Accessible without login HTML file read_arguments_class.html Doc. Class documentation
Accessible without login Plain text file test_read_arguments.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 0%Total:277All time:6,698
 This week:1This week:1,410Up
 User Comments (1)  
 
Its a very good class ! lool BUt a little confuse, you embed ...
3 years ago (Josť Filipe Lopes Santos)
80%StarStarStarStarStar