class Config implements IConfig (View source)

Default config class which stores all kind of configurations for the library.

Properties

protected array $options Container for the options.

Methods

__construct(array $options = array())

Creates the config.

setOption(string $name, mixed $value)

Change configuration option value.

mixed
getOption(string $name)

Get configuration option value.

void
assertOptionName(string $name)

Checks, that option exists in config.

Expectation
shouldReceive(string $name)

No description

Details

__construct(array $options = array())

Creates the config.

Parameters

array $options Config options.

IConfig setOption(string $name, mixed $value)

Change configuration option value.

Parameters

string $name Config option name.
mixed $value Config option value.

Return Value

IConfig

mixed getOption(string $name)

Get configuration option value.

Parameters

string $name Config option name.

Return Value

mixed

protected void assertOptionName(string $name)

Checks, that option exists in config.

Parameters

string $name Option name.

Return Value

void

Exceptions

ConfigException Thrown when option with a given name doesn't exist.

Expectation shouldReceive(string $name)

Parameters

string $name

Return Value

Expectation