Horde_Cli_Modular
in package
Glue class for a modular CLI.
Tags
Table of Contents
- $_modules : Horde_Cli_Modular_Modules
- Handler for the list of modules.
- $_parameters : array<string|int, mixed>
- Parameters.
- $_provider : Horde_Cli_Modular_ModuleProvider
- Module provider.
- __construct() : mixed
- Constructor.
- createParser() : Horde_Argv_Parser
- Create the parser for command line arguments.
- getModules() : Horde_Cli_Modular_Modules
- Return the module handler.
- getParserClass() : string
- Return the class name for the parser that should be used.
- getProvider() : Horde_Cli_Modular_ModuleProvider
- Return the module provider.
- getUsage() : string
- Return the usage description for the help output of the parser.
- _createModules() : Horde_Cli_Modular_Modules
- Create the module handler.
- _createProvider() : Horde_Cli_Modular_ModuleProvider
- Create the module provider.
Properties
$_modules
Handler for the list of modules.
protected
Horde_Cli_Modular_Modules
$_modules
$_parameters
Parameters.
protected
array<string|int, mixed>
$_parameters
$_provider
Module provider.
protected
Horde_Cli_Modular_ModuleProvider
$_provider
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $parameters = null ]) : mixed
Parameters
- $parameters : array<string|int, mixed> = null
-
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.
- parser
Return values
mixed —createParser()
Create the parser for command line arguments.
public
createParser() : Horde_Argv_Parser
Return values
Horde_Argv_Parser —The parser.
getModules()
Return the module handler.
public
getModules() : Horde_Cli_Modular_Modules
Return values
Horde_Cli_Modular_Modules —The module handler.
getParserClass()
Return the class name for the parser that should be used.
public
getParserClass() : string
Return values
string —The class name.
getProvider()
Return the module provider.
public
getProvider() : Horde_Cli_Modular_ModuleProvider
Return values
Horde_Cli_Modular_ModuleProvider —The module provider.
getUsage()
Return the usage description for the help output of the parser.
public
getUsage() : string
Return values
string —The usage description.
_createModules()
Create the module handler.
protected
_createModules() : Horde_Cli_Modular_Modules
Return values
Horde_Cli_Modular_Modules —The module handler.
_createProvider()
Create the module provider.
protected
_createProvider() : Horde_Cli_Modular_ModuleProvider
Return values
Horde_Cli_Modular_ModuleProvider —The module provider.