PHP Classes

Read arguments: Read and validate shell command line arguments

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 66%Total: 304 This week: 1All time: 7,381 This week: 560Up
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
  Performance   Level  
Name: Manuel Lemos is available for providing paid consulting. Contact Manuel Lemos .
Classes: 45 packages by
Country: Portugal Portugal
Age: 55
All time rank: 1
Week rank: 2 Down1 in Portugal Portugal 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:304
This week:1
All time:7,381
This week:560Up
User Ratings User Comments (1)
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:66%StarStarStarStar
Rank:503
 
Its a very good class ! lool BUt a little confuse, you embed ...
13 years ago (José Filipe Lopes Santos)
80%StarStarStarStarStar