Read arguments

Output of the example script
Package:
Read arguments
Summary:
Read and validate shell command line arguments
Groups:
Console, Validation
Author:
Manuel Lemos
Description:
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.


Tags: ,

This entry was posted on Wednesday, September 29th, 2010 at 11:53 pm
Entry is filed under Classes.
Read original posting here.
You can follow any responses to this entry through the RSS 2.0 feed.

Both comments and pings are currently closed. Total Views: 317

Comments are closed.