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

inst()

Get the current active Config instance.

modify()

Make this config available to be modified

nest()

Make the newly active {@link Config} be a copy of the current active {@link Config} instance.

unnest()

Change the active Config back to the Config instance the current active Config object was copied from.

static Config_ForClass
forClass(string $class)

Get an accessor that returns results by class by default.

Details

at line 44
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 54
static MutableConfigCollectionInterface modify()

Make this config available to be modified

at line 80
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.

Return Value

ConfigCollectionInterface Active config

at line 94
static ConfigCollectionInterface unnest()

Change the active Config back to the Config instance the current active Config object was copied from.

at line 118
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

Parameters

string $class

Return Value

Config_ForClass