Overview

Packages

  • Argv

Classes

  • Horde_Argv_AmbiguousOptionException
  • Horde_Argv_BadOptionException
  • Horde_Argv_Exception
  • Horde_Argv_HelpFormatter
  • Horde_Argv_IndentedHelpFormatter
  • Horde_Argv_Option
  • Horde_Argv_OptionConflictException
  • Horde_Argv_OptionContainer
  • Horde_Argv_OptionException
  • Horde_Argv_OptionGroup
  • Horde_Argv_OptionValueException
  • Horde_Argv_Parser
  • Horde_Argv_TitledHelpFormatter
  • Horde_Argv_Translation
  • Horde_Argv_Values
  • Overview
  • Package
  • Class
  • Tree

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

Package: Argv
Category: Horde
Located at Horde/Argv/Option.php
Methods summary
public static
# parseNumber( mixed $value )
public
# checkBuiltin( mixed $opt, mixed $value )
public
# checkChoice( mixed $opt, mixed $value )
public
# __construct( )

Constructor.

Constructor.

public
# _checkAction( )
public
# _checkType( )
public
# _checkChoice( )
public
# _checkDest( )
public
# _checkConst( )
public
# _checkNargs( )
public
# _checkCallback( )
public
# __toString( )
public
# takesValue( )
public
# hasDefault( )
public
# getOptString( )
public
# checkValue( mixed $opt, mixed $value )
public
# convertValue( mixed $opt, mixed $value )
public
# process( mixed $opt, mixed $value, mixed $values, mixed $parser )
public
# takeAction( mixed $action, mixed $dest, mixed $opt, mixed $value, mixed $values, mixed $parser )
Constants summary
string SUPPRESS_HELP
# 'SUPPRESS HELP'
string SUPPRESS_USAGE
# 'SUPPRESS USAGE'
Properties summary
public static array $NO_DEFAULT

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

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.

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.

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.)

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.

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.

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.

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
#
API documentation generated by ApiGen