\Horde_Argv_OptionContainer

Abstract base class.

Class attributes: standardOptionList : [Option] list of standard options that will be accepted by all instances of this parser class (intended to be overridden by subclasses).

Instance attributes: optionList : [Option] the list of Option objects contained by this OptionContainer shortOpt : { string : Option } dictionary mapping short option strings, eg. "-f" or "-X", to the Option instances that implement them. If an Option has multiple short option strings, it will appears in this dictionary multiple times. [1] longOpt : { string : Option } dictionary mapping long option strings, eg. "--file" or "--exclude", to the Option instances that implement them. Again, a given Option can occur multiple times in this dictionary. [1] defaults : { string : any } dictionary mapping option destination names to default values for each destination [1]

[1] These mappings are common to (shared by) all components of the controlling Horde_Argv_Parser, where they are initially created.

Summary

Methods
Properties
Constants
__construct()
setConflictHandler()
setDescription()
getDescription()
addOption()
addOptions()
getOption()
hasOption()
removeOption()
formatOptionHelp()
formatDescription()
formatHelp()
$description
$optionList
$optionClass
$defaults
$shortOpt
$longOpt
$conflictHandler
No constants found
_createOptionMappings()
_shareOptionMappings()
_checkConflict()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$description

$description : 

Type

$optionList

$optionList : 

Type

$optionClass

$optionClass : 

Type

$defaults

$defaults : 

Type

$shortOpt

$shortOpt : 

Type

$longOpt

$longOpt : 

Type

$conflictHandler

$conflictHandler : 

Type

Methods

__construct()

__construct(  $optionClass,   $conflictHandler,   $description) 

Initialize the option list and related data structures.

This method must be provided by subclasses, and it must initialize at least the following instance attributes: optionList, shortOpt, longOpt, defaults.

Parameters

$optionClass
$conflictHandler
$description

setConflictHandler()

setConflictHandler(  $handler) 

Parameters

$handler

setDescription()

setDescription(  $description) 

Parameters

$description

getDescription()

getDescription() 

addOption()

addOption() 

addOptions()

addOptions(  $optionList) 

Parameters

$optionList

getOption()

getOption(  $opt_str) 

Parameters

$opt_str

hasOption()

hasOption(  $opt_str) 

Parameters

$opt_str

removeOption()

removeOption(  $opt_str) 

Parameters

$opt_str

formatOptionHelp()

formatOptionHelp(  $formatter = null) 

Parameters

$formatter

formatDescription()

formatDescription(  $formatter = null) 

Parameters

$formatter

formatHelp()

formatHelp(  $formatter = null) 

Parameters

$formatter

_createOptionMappings()

_createOptionMappings() 

For use by Horde_Argv_Parser constructor -- create the master option mappings used by this Horde_Argv_Parser and all OptionGroups that it owns.

_shareOptionMappings()

_shareOptionMappings(  $parser) 

For use by OptionGroup constructor -- use shared option mappings from the Horde_Argv_Parser that owns this OptionGroup.

Parameters

$parser

_checkConflict()

_checkConflict(  $option) 

Parameters

$option