Class Horde_Argv_OptionContainer

Description

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.

Located in /Argv/lib/Horde/Argv/OptionContainer.php (line 41)


	
			
Direct descendents
Class Description
 class Horde_Argv_OptionGroup
 class Horde_Argv_Parser 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).
Variable Summary
Method Summary
 Horde_Argv_OptionContainer __construct ( $optionClass,  $conflictHandler,  $description)
 void addOption ()
 void addOptions ( $optionList)
 void formatDescription ([ $formatter = null])
 void formatHelp ([ $formatter = null])
 void formatOptionHelp ([ $formatter = null])
 void getDescription ()
 void getOption ( $opt_str)
 void hasOption ( $opt_str)
 void removeOption ( $opt_str)
 void setConflictHandler ( $handler)
 void setDescription ( $description)
 void _checkConflict ( $option)
 void _shareOptionMappings ( $parser)
Variables
mixed $conflictHandler (line 49)
  • access: public
mixed $defaults = array() (line 46)
  • access: public
mixed $description = '' (line 43)
  • access: public
mixed $longOpt = array() (line 48)
  • access: public
mixed $optionClass = 'Horde_Argv_Option' (line 45)
  • access: public
mixed $optionList = array() (line 44)
  • access: public
mixed $shortOpt = array() (line 47)
  • access: public
Methods
Constructor __construct (line 57)

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.

  • access: public
Horde_Argv_OptionContainer __construct ( $optionClass,  $conflictHandler,  $description)
  • $optionClass
  • $conflictHandler
  • $description

Redefined in descendants as:
addOption (line 154)
  • access: public
void addOption ()
addOptions (line 192)
  • access: public
void addOptions ( $optionList)
  • $optionList
formatDescription (line 249)
  • access: public
void formatDescription ([ $formatter = null])
  • $formatter
formatHelp (line 254)
  • access: public
void formatHelp ([ $formatter = null])
  • $formatter

Redefined in descendants as:
formatOptionHelp (line 237)
  • access: public
void formatOptionHelp ([ $formatter = null])
  • $formatter

Redefined in descendants as:
getDescription (line 102)
  • access: public
void getDescription ()

Redefined in descendants as:
getOption (line 201)
  • access: public
void getOption ( $opt_str)
  • $opt_str
hasOption (line 212)
  • access: public
void hasOption ( $opt_str)
  • $opt_str
removeOption (line 218)
  • access: public
void removeOption ( $opt_str)
  • $opt_str
setConflictHandler (line 89)
  • access: public
void setConflictHandler ( $handler)
  • $handler
setDescription (line 97)
  • access: public
void setDescription ( $description)
  • $description
_checkConflict (line 109)
  • access: protected
void _checkConflict ( $option)
  • $option
_createOptionMappings (line 71)

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

  • access: protected
void _createOptionMappings ()
_shareOptionMappings (line 82)

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

  • access: protected
void _shareOptionMappings ( $parser)
  • $parser

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