Configs
extends Base
in package
Components_Configs:: class represents configuration for the Horde component tool.
Copyright 2009-2020 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Tags
Table of Contents
- $_arguments : array<string|int, mixed>
- Additional arguments.
- $_options : array<string|int, mixed>
- Additional options.
- $_collected : bool
- Have the arguments been collected?
- $_component : Component|null
- The selected component.
- $_configs : array<string|int, mixed>
- The different configuration handlers.
- $_path : string|null
- The path to component in case the selected one is a source component.
- __construct() : mixed
- Constructor.
- addConfigurationType() : void
- Add a configuration type to the configuration handler.
- getArguments() : array<string|int, mixed>
- Return the arguments provided by the configuration handlers.
- getComponent() : Component
- Return the selected component.
- getOption() : mixed
- Return the specified option.
- getOptions() : array<string|int, mixed>
- Return the options provided by the configuration handlers.
- getPath() : string
- Get the path to the directory of the selected component (in case it was a source component).
- handleModules() : void
- Provide each configuration handler with the list of supported modules.
- setComponent() : void
- Set the path to the component directory.
- setOption() : void
- Set an additional option value.
- setPath() : void
- Set the path to the directory of the selected source component.
- shiftArgument() : mixed
- Shift an element from the argument list.
- unshiftArgument() : void
- Unshift an element to the argument list.
- unshiftConfigurationType() : void
- Store a configuration type at the start of the configuration stack. Any options provided by the new configuration can/will be overridden by configurations already present.
Properties
$_arguments
Additional arguments.
protected
array<string|int, mixed>
$_arguments
= []
$_options
Additional options.
protected
array<string|int, mixed>
$_options
= []
$_collected
Have the arguments been collected?
private
bool
$_collected
= false
$_component
The selected component.
private
Component|null
$_component
= null
$_configs
The different configuration handlers.
private
array<string|int, mixed>
$_configs
= []
$_path
The path to component in case the selected one is a source component.
private
string|null
$_path
= null
Methods
__construct()
Constructor.
public
__construct() : mixed
Return values
mixed —addConfigurationType()
Add a configuration type to the configuration handler.
public
addConfigurationType(Config $type) : void
Parameters
- $type : Config
-
The configuration type.
Return values
void —getArguments()
Return the arguments provided by the configuration handlers.
public
getArguments() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of arguments.
getComponent()
Return the selected component.
public
getComponent() : Component
Tags
Return values
Component —The selected component.
getOption()
Return the specified option.
public
getOption(string $option) : mixed
Parameters
- $option : string
-
The name of the option.
Return values
mixed —The option value or NULL if it is not defined.
getOptions()
Return the options provided by the configuration handlers.
public
getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of options.
getPath()
Get the path to the directory of the selected component (in case it was a source component).
public
getPath() : string
Return values
string —The path to the component directory.
handleModules()
Provide each configuration handler with the list of supported modules.
public
handleModules(Modules $modules) : void
Parameters
- $modules : Modules
-
A list of modules.
Return values
void —setComponent()
Set the path to the component directory.
public
setComponent(Component $component) : void
Parameters
- $component : Component
-
The path to the component directory.
Return values
void —setOption()
Set an additional option value.
public
setOption(string $key, string $value) : void
Parameters
- $key : string
-
The option to set.
- $value : string
-
The value of the option.
Return values
void —setPath()
Set the path to the directory of the selected source component.
public
setPath(string $path) : void
Parameters
- $path : string
-
The path to the component directory.
Return values
void —shiftArgument()
Shift an element from the argument list.
public
shiftArgument() : mixed
Return values
mixed —The shifted element.
unshiftArgument()
Unshift an element to the argument list.
public
unshiftArgument(string $element) : void
Parameters
- $element : string
-
The element to unshift.
Return values
void —unshiftConfigurationType()
Store a configuration type at the start of the configuration stack. Any options provided by the new configuration can/will be overridden by configurations already present.
public
unshiftConfigurationType(Config $type) : void
Parameters
- $type : Config
-
The configuration type.