Class Horde_Argv_Option
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
public static
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
string |
SUPPRESS_HELP
|
#
'SUPPRESS HELP'
|
string |
SUPPRESS_USAGE
|
#
'SUPPRESS USAGE'
|
public static
array
|
$NO_DEFAULT
Not supplying a default is different from a default of None, so we need an explicit "not supplied" value. |
#
array('NO', 'DEFAULT')
|
public
array
|
$ATTRS
The list of instance attributes that may be set through keyword args to the constructor. |
#
array(
'action',
'type',
'dest',
'default',
'nargs',
'const',
'choices',
'callback',
'callbackArgs',
'help',
'metavar',
)
|
public
array
|
$ACTIONS
The set of actions allowed by option parsers. Explicitly listed here so the constructor can validate its arguments. |
#
array(
'store',
'store_const',
'store_true',
'store_false',
'append',
'append_const',
'count',
'callback',
'help',
'version',
)
|
public
array
|
$STORE_ACTIONS
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.) |
#
array(
'store',
'store_const',
'store_true',
'store_false',
'append',
'append_const',
'count',
)
|
public
array
|
$TYPED_ACTIONS
The set of actions for which it makes sense to supply a value type, ie. which may consume an argument from the command line. |
#
array(
'store',
'append',
'callback',
)
|
public
array
|
$ALWAYS_TYPED_ACTIONS
The set of actions which require a value type, ie. that always consume an argument from the command line. |
#
array('store', 'append')
|
public
array
|
$CONST_ACTIONS
The set of actions which take a 'const' attribute. |
#
array('store_const', 'append_const')
|
public
array
|
$TYPES
|
#
array('string', 'int', 'long', 'float', 'complex', 'choice')
|
public
array
|
$TYPE_CHECKER
|
#
array("int" => 'checkBuiltin',
"long" => 'checkBuiltin',
"float" => 'checkBuiltin',
"complex"=> 'checkBuiltin',
"choice" => 'checkChoice',
)
|
public
array
|
$CHECK_METHODS
|
#
array('_checkAction',
'_checkType',
'_checkChoice',
'_checkDest',
'_checkConst',
'_checkNargs',
'_checkCallback',
)
|
public
array
|
$shortOpts
|
#
array()
|
public
array
|
$longOpts
|
#
array()
|
public
mixed
|
$dest
|
|
public
mixed
|
$default
|