CachingConfigLoader
in package
implements
ConfigLoaderInterface
Decorator that adds caching to a service description loader
Table of Contents
Interfaces
- ConfigLoaderInterface
- Interface used for loading configuration data (service descriptions, service builder configs, etc)
Properties
- $cache : CacheAdapterInterface
- $loader : ConfigLoaderInterface
Methods
- __construct() : mixed
- load() : mixed
- Loads configuration data and returns an array of the loaded result
Properties
$cache
protected
CacheAdapterInterface
$cache
$loader
protected
ConfigLoaderInterface
$loader
Methods
__construct()
public
__construct(ConfigLoaderInterface $loader, CacheAdapterInterface $cache) : mixed
Parameters
- $loader : ConfigLoaderInterface
-
Loader used to load the config when there is a cache miss
- $cache : CacheAdapterInterface
-
Object used to cache the loaded result
load()
Loads configuration data and returns an array of the loaded result
public
load(mixed $config[, array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $config : mixed
-
Data to load (filename or array of data)
- $options : array<string|int, mixed> = array()
-
Array of options to use when loading