DeltaConfigCollection
class DeltaConfigCollection extends MemoryConfigCollection (View source)
Applies config modifications as a set of deltas on top of the middleware, instead of as modifications to the underlying list.
Traits
Constants
REMOVE |
Remove delta |
MERGE |
Merge delta |
CLEAR |
Remove all config for this class |
REPLACE |
Replace all config for this class |
SET |
Set delta |
Methods
No description
Construct a delta collection
Sets config for a given field.
Fetches value for a class, or a property on that class
Checks to see if a config item exists, or a property on that class
Remove config for a given class, or field on that class
Delete all entries
Merge a config for a class, or a field on that class
No description
Get nested version of this config, which is normally duplicated version of this config, but could be a subclass.
Create a delta collection from a parent collection
Get middleware for handling deltas
Get deltas for the given class
Check if config should be completely reset before getting config
No description
Details
Middleware[]
getMiddlewares()
$this
setMiddlewares(Middleware[] $middlewares)
$this
addMiddleware(Middleware $middleware)
__construct(bool $trackMetadata = false, int $middlewareFlag = 0)
Construct a delta collection
static MemoryConfigCollection
create()
$this
transform(TransformerInterface[] $transformers)
Trigger transformers to load into this store
$this
set(string $class, string $name, $data, array $metadata = [])
Sets config for a given field.
Set name to null to set the config for the entire class.
mixed
get(string $class, string $name = null, int|true $excludeMiddleware = 0)
Fetches value for a class, or a property on that class
bool
exists(string $class, string $name = null, int|true $excludeMiddleware = 0)
Checks to see if a config item exists, or a property on that class
$this
remove(string $class, string $name = null)
Remove config for a given class, or field on that class
removeAll()
Delete all entries
array
getAll()
Get complete config (excludes middleware-applied config)
$this
update(string $class, string $name, mixed $value)
deprecated
deprecated
$this
merge(string $class, string $name, mixed $value)
Merge a config for a class, or a field on that class
array
getMetadata()
Returns the entire metadata
getHistory()
serialize()
unserialize($serialized)
ConfigCollectionInterface
nest()
Get nested version of this config, which is normally duplicated version of this config, but could be a subclass.
static DeltaConfigCollection
createFromCollection(ConfigCollectionInterface $parent, int $middlewareFlag = 0)
Create a delta collection from a parent collection
DeltaMiddleware
getDeltaMiddleware()
Get middleware for handling deltas
array
getDeltas(string $class)
Get deltas for the given class
bool
isDeltaReset(string $class = null)
Check if config should be completely reset before getting config