Documentation

File extends Base
in package

Config\File:: class provides simple options for the bootstrap process.

Copyright 2011-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
category

Horde

author

Gunnar Wrobel wrobel@pardus.de

license

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

Table of Contents

$_arguments  : array<string|int, mixed>
Additional arguments.
$_options  : array<string|int, mixed>
Additional options.
$_component  : Component|null
The selected component.
$_path  : string|null
The path to component in case the selected one is a source component.
__construct()  : mixed
Constructor.
getArguments()  : array<string|int, mixed>
Return the arguments parsed from the command line.
getComponent()  : Component
Return the selected component.
getOption()  : mixed
Return the specified option.
getOptions()  : array<string|int, mixed>
Return all options.
getPath()  : string
Get the path to the directory of the selected component (in case it was a source component).
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.

Properties

$_arguments

Additional arguments.

protected array<string|int, mixed> $_arguments = []

$_options

Additional options.

protected array<string|int, mixed> $_options = []

$_component

The selected component.

private Component|null $_component = null

$_path

The path to component in case the selected one is a source component.

private string|null $_path = null

Methods

__construct()

Constructor.

public __construct(string $path) : mixed
Parameters
$path : string

The path to the configuration file.

Return values
mixed

getArguments()

Return the arguments parsed from the command line.

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

An array of arguments.

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 all options.

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

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.

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

Search results