Config
class Config
Constants
UNINHERITED |
source options bitmask value - only get configuration set for this specific class, not any of it's parents. |
EXCLUDE_EXTRA_SOURCES |
|
NO_DELTAS |
Disable all modifications to the config |
Methods
Get the current active Config instance.
Make this config available to be modified
Make the newly active {@link Config} be a copy of the current active {@link Config} instance.
Change the active Config back to the Config instance the current active Config object was copied from.
Get an accessor that returns results by class by default.
Perform the given operation in an isolated config state.
Details
at line 43
static ConfigCollectionInterface
inst()
Get the current active Config instance.
In general use you will use this method to obtain the current Config instance. It assumes the config instance has already been set.
at line 53
static MutableConfigCollectionInterface
modify()
Make this config available to be modified
at line 79
static ConfigCollectionInterface
nest()
Make the newly active {@link Config} be a copy of the current active {@link Config} instance.
You can then make changes to the configuration by calling update and remove on the new value returned by {@link Config::inst()}, and then discard those changes later by calling unnest.
at line 93
static ConfigCollectionInterface
unnest()
Change the active Config back to the Config instance the current active Config object was copied from.
at line 117
static Config_ForClass
forClass(string $class)
Get an accessor that returns results by class by default.
Shouldn't be overridden, since there might be many Config_ForClass instances already held in the wild. Each Config_ForClass instance asks the current_instance of Config for the actual result, so override that instead
at line 129
static mixed
withConfig(callable $callback)
Perform the given operation in an isolated config state.
On return, the config state will be restored, so any modifications are temporary.