Class Horde_Argv_Option

Description

Defines the Option class and some standard value-checking functions.

Instance attributes: shortOpts : [string] longOpts : [string]

action : string type : string dest : string default : any nargs : int const : any choices : [string] callback : function callbackArgs : (any*) help : string metavar : string

Located in /Argv/lib/Horde/Argv/Option.php (line 32)


	
			
Direct descendents
Class Description
 class Horde_Argv_DurationOption Defines the Option class and some standard value-checking functions.
 class Horde_Argv_ExtendAddActionsTest_MyOption Defines the Option class and some standard value-checking functions.
 class Horde_Argv_ExtendAddTypesTest_MyOption Defines the Option class and some standard value-checking functions.
Class Constant Summary
 SUPPRESS_HELP = "SUPPRESS HELP"
 SUPPRESS_USAGE = "SUPPRESS USAGE"
Variable Summary
 static mixed $NO_DEFAULT
 mixed $ACTIONS
 mixed $ATTRS
 mixed $default
 mixed $dest
 mixed $longOpts
 mixed $shortOpts
 mixed $TYPES
Method Summary
 static void parseNumber ( $value)
 Horde_Argv_Option __construct ()
 void checkBuiltin ( $opt,  $value)
 void checkChoice ( $opt,  $value)
 void checkValue ( $opt,  $value)
 void convertValue ( $opt,  $value)
 void getOptString ()
 void process ( $opt,  $value,  $values,  $parser)
 void takeAction ( $action,  $dest,  $opt,  $value,  $values,  $parser)
 void takesValue ()
 void _checkAction ()
 void _checkCallback ()
 void _checkChoice ()
 void _checkConst ()
 void _checkDest ()
 void _checkNargs ()
 void _checkOptStrings ( $opts)
 void _checkType ()
 void _setAttrs ( $attrs)
 void _setOptStrings ( $opts)
 void __toString ()
Variables
static mixed $NO_DEFAULT = array("NO", "DEFAULT") (line 41)

Not supplying a default is different from a default of None, so we need an explicit "not supplied" value.

  • access: public
mixed $ACTIONS = array("store",
"store_const",
"store_true",
"store_false",
"append",
"append_const",
"count",
"callback",
"help",
"version",
)
(line 145)
  • access: public

Redefined in descendants as:
mixed $ALWAYS_TYPED_ACTIONS = array("store",
"append",
)
(line 182)

The set of actions which *require* a value type, ie. that always consume an argument from the command line.

  • access: public
mixed $ATTRS = array('action',
'type',
'dest',
'default',
'nargs',
'const',
'choices',
'callback',
'callbackArgs',
'help',
'metavar',
)
(line 130)
  • access: public
mixed $CHECK_METHODS = array('_checkAction',
'_checkType',
'_checkChoice',
'_checkDest',
'_checkConst',
'_checkNargs',
'_checkCallback',
)
(line 226)
  • access: public
mixed $CONST_ACTIONS = array("store_const",
"append_const",
)
(line 187)
  • access: public
mixed $default (line 240)
  • access: public
mixed $dest (line 239)
  • access: public
mixed $longOpts = array() (line 238)
  • access: public
mixed $shortOpts = array() (line 237)
  • access: public
mixed $STORE_ACTIONS = array("store",
"store_const",
"store_true",
"store_false",
"append",
"append_const",
"count",
)
(line 162)

The set of actions that involve storing a value somewhere;

also listed just for constructor argument validation. (If the action is one of these, there must be a destination.)

  • access: public

Redefined in descendants as:
mixed $TYPED_ACTIONS = array("store",
"append",
"callback",
)
(line 173)
  • access: public

Redefined in descendants as:
mixed $TYPES = array("string", "int", "long", "float", "complex", "choice") (line 193)
  • access: public

Redefined in descendants as:
mixed $TYPE_CHECKER = array("int" => 'checkBuiltin',
"long" => 'checkBuiltin',
"float" => 'checkBuiltin',
"complex"=> 'checkBuiltin',
"choice" => 'checkChoice',
)
(line 211)
  • access: public

Redefined in descendants as:
Methods
static parseNumber (line 43)
  • access: public
static void parseNumber ( $value)
  • $value
Constructor __construct (line 242)
  • access: public
Horde_Argv_Option __construct ()
checkBuiltin (line 86)
  • access: public
void checkBuiltin ( $opt,  $value)
  • $opt
  • $value
checkChoice (line 111)
  • access: public
void checkChoice ( $opt,  $value)
  • $opt
  • $value
checkValue (line 486)
  • access: public
void checkValue ( $opt,  $value)
  • $opt
  • $value
convertValue (line 495)
  • access: public
void convertValue ( $opt,  $value)
  • $opt
  • $value
getOptString (line 475)
  • access: public
void getOptString ()
process (line 510)
  • access: public
void process ( $opt,  $value,  $values,  $parser)
  • $opt
  • $value
  • $values
  • $parser
takeAction (line 523)
  • access: public
void takeAction ( $action,  $dest,  $opt,  $value,  $values,  $parser)
  • $action
  • $dest
  • $opt
  • $value
  • $values
  • $parser

Redefined in descendants as:
takesValue (line 470)
  • access: public
void takesValue ()
_checkAction (line 337)
  • access: public
void _checkAction ()
_checkCallback (line 431)
  • access: public
void _checkCallback ()
_checkChoice (line 374)
  • access: public
void _checkChoice ()
_checkConst (line 409)
  • access: public
void _checkConst ()
_checkDest (line 391)
  • access: public
void _checkDest ()
_checkNargs (line 418)
  • access: public
void _checkNargs ()
_checkOptStrings (line 274)
  • access: protected
void _checkOptStrings ( $opts)
  • $opts
_checkType (line 346)
  • access: public
void _checkType ()
_setAttrs (line 311)
  • access: protected
void _setAttrs ( $attrs)
  • $attrs
_setOptStrings (line 286)
  • access: protected
void _setOptStrings ( $opts)
  • $opts
__toString (line 465)
  • access: public
void __toString ()
Class Constants
SUPPRESS_HELP = "SUPPRESS HELP" (line 34)
SUPPRESS_USAGE = "SUPPRESS USAGE" (line 35)

Documentation generated on Sun, 30 Jan 2011 05:20:10 +0000 by phpDocumentor 1.4.3