PHP Класс PhpBench\Registry\ConfigurableRegistry

TODO: Coupling configuration to the registry is convenient but the two are effectively unrelated and could be decoupled. $config = $reg->getConfig('foobar');
Наследование: extends Registry
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( $serviceType, PhpBench\DependencyInjection\Container $container, JsonDecoder $jsonDecoder )
getConfig ( $name ) : Config Return the named configuration.
setConfig ( string $name, array $config ) Set a named configuration.

Приватные методы

Метод Описание
processRawCliConfig ( $rawConfig ) : array Process raw configuration as received from the CLI, for example:.
resolveConfig ( $name ) : array Recursively merge configs (having the "extends" key) which extend another report.

Описание методов

__construct() публичный метод

public __construct ( $serviceType, PhpBench\DependencyInjection\Container $container, JsonDecoder $jsonDecoder )
$container PhpBench\DependencyInjection\Container
$jsonDecoder PhpBench\Json\JsonDecoder

getConfig() публичный метод

Return the named configuration.
public getConfig ( $name ) : Config
Результат Config

setConfig() публичный метод

Note that all configurations must be associated with a named service via a configuration key equal to the configuration service type of this registry.
public setConfig ( string $name, array $config )
$name string
$config array