ConfigFactoryInterface
interface ConfigFactoryInterface (View source)
Defines the interface for a configuration object factory.
Methods
Returns an immutable configuration object for a given name.
Returns a mutable configuration object for a given name.
Returns a list of configuration objects for the given names.
Resets and re-initializes configuration objects. Internal use only.
Renames a configuration object using the storage.
The cache keys associated with the state of the config factory.
Clears the config factory static cache.
Gets configuration object names starting with a given prefix.
Adds config factory override services.
Details
ImmutableConfig
get(string $name)
Returns an immutable configuration object for a given name.
Config
getEditable(string $name)
Returns a mutable configuration object for a given name.
Should not be used for config that will have runtime effects. Therefore it is always loaded override free.
ImmutableConfig[]
loadMultiple(array $names)
Returns a list of configuration objects for the given names.
This will pre-load all requested configuration objects does not create new configuration objects. This method always return immutable objects. ConfigFactoryInterface::getEditable() should be used to retrieve mutable configuration objects, one by one.
$this
reset(string|null $name = NULL)
Resets and re-initializes configuration objects. Internal use only.
$this
rename(string $old_name, string $new_name)
Renames a configuration object using the storage.
array
getCacheKeys()
The cache keys associated with the state of the config factory.
All state information that can influence the result of a get() should be included. Typically, this includes a key for each override added via addOverride(). This allows external code to maintain caches of configuration data in addition to or instead of caches maintained by the factory.
$this
clearStaticCache()
Clears the config factory static cache.
array
listAll(string $prefix = '')
Gets configuration object names starting with a given prefix.
addOverride(ConfigFactoryOverrideInterface $config_factory_override)
Adds config factory override services.