\Horde_Cli_Modular

Glue class for a modular CLI.

Summary

Methods
Properties
Constants
__construct()
getParserClass()
getUsage()
createParser()
getModules()
getProvider()
No public properties found
No constants found
_createModules()
_createProvider()
$_parameters
$_modules
$_provider
N/A
No private methods found
No private properties found
N/A

Properties

$_parameters

$_parameters : array

Parameters.

Type

array

Methods

__construct()

__construct(array  $parameters = null) 

Constructor.

Parameters

array $parameters

Options for this instance.

  • parser
    • class: Class name of the parser that should be used to parse command line arguments. Defaults to 'Horde_Argv_Parser'.
    • usage: The usage decription shown in the help output of the CLI
  • modules: Determines the handler for modules. Can be one of: (array) A parameter array. See Horde_Cli_Modular_Modules::__construct() (string) A class name. (object) An instance of Horde_Cli_Modular_Modules
  • provider: Determines the module provider. Can be one of: (array) A parameter array. See Horde_Cli_Modular_ModuleProvider::__construct() (string) A class name. (object) An instance of Horde_Cli_Modular_ModuleProvider
  • cli: (Horde_Cli) A Horde_Cli object for usage formatting.

getParserClass()

getParserClass() : string

Return the class name for the parser that should be used.

Returns

string —

The class name.

getUsage()

getUsage() : string

Return the usage description for the help output of the parser.

Returns

string —

The usage description.

createParser()

createParser() : \Horde_Argv_Parser

Create the parser for command line arguments.

Returns

\Horde_Argv_Parser —

The parser.

getModules()

getModules() : \Horde_Cli_Modular_Modules

Return the module handler.

Returns

\Horde_Cli_Modular_Modules

The module handler.

_createModules()

_createModules() : \Horde_Cli_Modular_Modules

Create the module handler.

Returns

\Horde_Cli_Modular_Modules

The module handler.

_createProvider()

_createProvider() : \Horde_Cli_Modular_ModuleProvider

Create the module provider.

Returns

\Horde_Cli_Modular_ModuleProvider

The module provider.