Class Parser
Class in charge of parsing the command line options
Methods summary
public
|
|
public
Peg\Custom\CommandLine\Option[]
|
|
public
Peg\Custom\CommandLine\Option|boolean
|
#
GetOption( string $name )
Get an option by its long name.
Get an option by its long name.
Parameters
Returns
|
public
Peg\Custom\CommandLine\Command[]
|
|
public
Peg\Custom\CommandLine\Command|boolean
|
#
GetCommand( string $name )
Get a command object by its name.
Get a command object by its name.
Parameters
Returns
|
public
|
|
public
|
|
public
|
#
Start( integer $argc, array $argv )
Begins the process of reading command line options and calling command
actions as needed.
Begins the process of reading command line options and calling command
actions as needed.
Parameters
- $argc
integer $argc
- $argv
array $argv
|
public
|
#
PrintHelp( )
Generates and prints the help based on the registered commands and
options.
Generates and prints the help based on the registered commands and
options.
|
public
|
#
PrintVersion( )
Generates and prints the help based on the registered commands and
options.
Generates and prints the help based on the registered commands and
options.
|
Properties summary
public
string
|
$application_name
|
|
#
Name of the main application using the command line parser, displayed when
printing the help message.
Name of the main application using the command line parser, displayed when
printing the help message.
|
public
string
|
$application_version
|
|
#
Version number of the main application using the command line parser,
displayed when printing the help message.
Version number of the main application using the command line parser,
displayed when printing the help message.
|
public
string
|
$application_description
|
|
#
Description of the main application using the command line parser, displayed
when printing the help message.
Description of the main application using the command line parser, displayed
when printing the help message.
|