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


Classes:
Console_CommandLine
Console_CommandLine_Action
Console_CommandLine_Action_Callback
Console_CommandLine_Action_Counter
Console_CommandLine_Action_Help
Console_CommandLine_Action_List
Console_CommandLine_Action_Password
Console_CommandLine_Action_StoreArray
Console_CommandLine_Action_StoreFalse
Console_CommandLine_Action_StoreFloat
Console_CommandLine_Action_StoreInt
Console_CommandLine_Action_StoreString
Console_CommandLine_Action_StoreTrue
Console_CommandLine_Action_Version
Console_CommandLine_Argument
Console_CommandLine_Command
Console_CommandLine_Element
Console_CommandLine_Exception
Console_CommandLine_MessageProvider_Default
Console_CommandLine_Option
Console_CommandLine_Outputter_Default
Console_CommandLine_Renderer_Default
Console_CommandLine_Result
Console_CommandLine_XmlParser
Files:
Action.php
Argument.php
Callback.php
Command.php
CommandLine.php
Counter.php
CustomMessageProvider.php
Default.php
Default.php
Default.php
Element.php
ex1.php
ex2.php
ex3.php
ex4.php
Exception.php
Help.php
List.php
MessageProvider.php
Option.php
Outputter.php
Password.php
Renderer.php
Result.php
StoreArray.php
StoreFalse.php
StoreFloat.php
StoreInt.php
StoreString.php
StoreTrue.php
Version.php
XmlParser.php

Class: Console_CommandLine_Element

Source Location: /Console_CommandLine-1.1.3/Console/CommandLine/Element.php

Class Overview


Class that represent a command line element (an option, or an argument).


Author(s):

Version:

  • Release: 1.1.3

Copyright:

  • 2007 David JEAN LOUIS

Variables

Methods


Child classes:

Console_CommandLine_Argument
Class that represent a command line argument.
Console_CommandLine_Option
Class that represent a commandline option.

Inherited Variables

Inherited Methods


Class Details

[line 37]
Class that represent a command line element (an option, or an argument).


[ Top ]


Class Variables

$description =

[line 61]

The element description.
  • Var: Element description
  • Access: public

Type: string


[ Top ]

$help_name =

[line 54]

The name of variable displayed in the usage message, if no set it defaults to the "name" property.
  • Var: Element "help" variable name
  • Access: public

Type: string


[ Top ]

$messages = array()

[line 90]

Custom errors messages for this element

This array is of the form:

  1. <?php
  2. array(
  3. $messageName => $messageText,
  4. $messageName => $messageText,
  5. ...
  6. );
  7. ?>

If specified, these messages override the messages provided by the default message provider. For example:

  1. <?php
  2. $messages = array(
  3. 'ARGUMENT_REQUIRED' => 'The argument foo is required.',
  4. );
  5. ?>


Type: array


[ Top ]

$name =

[line 46]

The element name.
  • Var: Element name
  • Access: public

Type: string


[ Top ]



Method Detail

__construct (Constructor) [line 103]

void __construct( [string $name = null], [array $params = array()])

Constructor.
  • Access: public

Overridden in child classes as:

Console_CommandLine_Option::__construct()
Constructor.

Parameters:

string $name — The name of the element
array $params — An optional array of parameters

[ Top ]

toString [line 122]

string toString( )

Returns the string representation of the element.
  • Return: The string representation of the element
  • Todo: use __toString() instead
  • Access: public

Overridden in child classes as:

Console_CommandLine_Option::toString()
Returns the string representation of the option.

[ Top ]

validate [line 135]

void validate( )

Validates the element instance and set it's default values.
  • Throws: Console_CommandLine_Exception
  • Access: public

Overridden in child classes as:

Console_CommandLine_Argument::validate()
Validates the argument instance.
Console_CommandLine_Option::validate()
Validates the option instance.

[ Top ]


Documentation generated on 2019年3月11日 15:37:02 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.

AltStyle によって変換されたページ (->オリジナル) /