Documentation

Horde_Cli_Modular
in package

Glue class for a modular CLI.

Tags
author

Gunnar Wrobel wrobel@pardus.de

category

Horde

copyright

2010-2017 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL

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

$_parameters

Parameters.

protected array<string|int, mixed> $_parameters

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.
Return values
mixed

createParser()

Create the parser for command line arguments.

public createParser() : Horde_Argv_Parser
Return values
Horde_Argv_Parser

The parser.

getParserClass()

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

public getParserClass() : string
Return values
string

The class name.

getUsage()

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

public getUsage() : string
Return values
string

The usage description.

Search results