Console_CommandLine
[ class tree: Console_CommandLine ] [ index: Console_CommandLine ] [ all elements ]

Class: Console_CommandLine_Command

Source Location: /Console_CommandLine-1.0.0/CommandLine/Command.php

Class Overview

Console_CommandLine
   |
   --Console_CommandLine_Command

Class that represent a command with option and arguments.


Author(s):

Version:

  • Release: 1.0.0

Copyright:

  • 2007 David JEAN LOUIS

Inherited Variables

Inherited Methods

Class: Console_CommandLine

Console_CommandLine::__construct()
Constructor.
Console_CommandLine::accept()
Method to allow Console_CommandLine to accept either:
Console_CommandLine::addArgument()
Add an argument with the given $name to the command line parser.
Console_CommandLine::addCommand()
Add a sub-command to the command line parser.
Console_CommandLine::addOption()
Add an option to the command line parser.
Console_CommandLine::displayError()
Display an error to the user and exit with $exitCode.
Console_CommandLine::displayUsage()
Display the usage help message to the user and exit with $exitCode
Console_CommandLine::displayVersion()
Display the program version to the user
Console_CommandLine::findOption()
Find the option that matches the given short_name (ex: -v), long_name (ex: --verbose) or name (ex: verbose).
Console_CommandLine::fromXmlFile()
Return a command line parser instance built from an xml file.
Console_CommandLine::fromXmlString()
Return a command line parser instance built from an xml string.
Console_CommandLine::parse()
Parse the command line arguments and return a Console_CommandLine_Result object.
Console_CommandLine::parseToken()
Parse the command line token and modify *by reference* the $options and $args arrays.
Console_CommandLine::registerAction()
Register a custom action for the parser, an example:
Console_CommandLine::triggerError()
A wrapper for programming errors triggering.

Class Details

[line 45]
Class that represent a command with option and arguments.

This class exist just to clarify the interface but at the moment it is strictly identical to Console_CommandLine class, it could change in the future though.



[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:22:17 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.