PHP Class 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');
Inheritance: extends Registry
Show file Open project: dantleech/phpbench Class Usage Examples

Public Methods

Method Description
__construct ( $serviceType, PhpBench\DependencyInjection\Container $container, JsonDecoder $jsonDecoder )
getConfig ( $name ) : Config Return the named configuration.
setConfig ( string $name, array $config ) Set a named configuration.

Private Methods

Method Description
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.

Method Details

__construct() public method

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

getConfig() public method

Return the named configuration.
public getConfig ( $name ) : Config
return Config

setConfig() public method

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