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

Class: Console_CommandLine_Element

Source Location: /Console_CommandLine-1.0.6/CommandLine/Element.php

Class Overview


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


Author(s):

Version:

  • Release: 1.0.6

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 ]

$name =

[line 46]

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

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 74]

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 93]

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 106]

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 Mon, 11 Mar 2019 15:28:01 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.