Documentation

Query
in package
implements Horde_Cli_Modular_Module, Horde_Cli_Modular_ModuleUsage Uses HordectlModuleTrait, HasModulesTrait

Query command module implements CLI Query Yaml output

Interfaces, Classes, Traits and Enums

Horde_Cli_Modular_Module
Horde_Cli_Modular_ModuleUsage

Table of Contents

$_modules  : mixed
$_parentModule  : mixed
$_parsed  : mixed
$_parser  : mixed
$_positional  : mixed
__construct()  : mixed
count()  : int
Implementation of Countable count() method. Returns the number of modules.
getBaseOptions()  : mixed
getIterator()  : mixed
getOptionGroupDescription()  : mixed
getOptionGroupOptions()  : mixed
getOptionGroupTitle()  : mixed
getParentModule()  : Horde_Cli_Modular_Module
getPositionalArgs()  : array<string|int, mixed>
Get the list of possible arguments for this module's position
getTitle()  : string
Default implementation of getTitle
getUsage()  : mixed
handle()  : mixed
Decide if this module handles the commandline
handleCommandline()  : mixed
Handle commandline given to this module
hasOptionGroup()  : mixed
isRootModule()  : mixed
listModules()  : array<string|int, mixed>
List the available modules.
setParentModule()  : mixed
_initModules()  : mixed
Initialize the list of direct submodules to the current module

Properties

Methods

__construct()

public __construct(Horde_Injector $dependencies) : mixed
Parameters
$dependencies : Horde_Injector
Return values
mixed

count()

Implementation of Countable count() method. Returns the number of modules.

public count() : int
Return values
int

Number of modules.

getOptionGroupDescription()

public getOptionGroupDescription() : mixed
Return values
mixed

getOptionGroupOptions()

public getOptionGroupOptions([mixed $action = null ]) : mixed
Parameters
$action : mixed = null
Return values
mixed

getParentModule()

public getParentModule() : Horde_Cli_Modular_Module
Return values
Horde_Cli_Modular_Module

getPositionalArgs()

Get the list of possible arguments for this module's position

public getPositionalArgs() : array<string|int, mixed>

If a module implements a positional, it will be extracted before the commandline is evaluated

Default implementation, override as needed

Return values
array<string|int, mixed>

getTitle()

Default implementation of getTitle

public getTitle() : string

Override this as needed

Return values
string

The title of the module

handle()

Decide if this module handles the commandline

public handle([array<string|int, mixed> $argv = [] ]) : mixed

Each query submodule returns an array. Modules not queried return an empty array. Modules queried return an array of format:

[apps] [$app] => The application providing the query module or "builtin" [resources] => A List of ResourceTypes [$resourceType] => The type identifier [items] => A List of resource entry representations

These will be merged and written to Yaml output format

Parameters
$argv : array<string|int, mixed> = []
Tags
params

array $argv The arguments for the parser to digest

Return values
mixed

handleCommandline()

Handle commandline given to this module

public handleCommandline(array<string|int, mixed> $argv) : mixed

Commandline options and keywords belonging to parent modules have already been removed. The module's PositionalArgs will be checked in second position and removed. Options will only be regarded until the following positional argument.

Position 0 in argv is assumed to be the program name // non-interspersed parser may not tolerate position 0

Parameters
$argv : array<string|int, mixed>
Return values
mixed

listModules()

List the available modules.

public listModules() : array<string|int, mixed>
Return values
array<string|int, mixed>

The list of modules.

setParentModule()

public setParentModule(Horde_Cli_Modular_Module $module) : mixed
Parameters
$module : Horde_Cli_Modular_Module
Return values
mixed

_initModules()

Initialize the list of direct submodules to the current module

private _initModules(Horde_Injector $dependencies, string $prefix, string $directory[, array<string|int, mixed> $exclude = [] ]) : mixed

First check a certain folder for files and assume they adhere to a certain class name schema TODO: Then check all registered apps for a list of well known classnames

Initialize all modules and assign them their parent

Parameters
$dependencies : Horde_Injector
$prefix : string
$directory : string
$exclude : array<string|int, mixed> = []
Return values
mixed

Search results