DeltaConfigCollection
class DeltaConfigCollection extends MemoryConfigCollection
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
at line 105
Middleware[]
getMiddlewares()
in MiddlewareAware at line 24
$this
setMiddlewares(Middleware[] $middlewares)
in MiddlewareAware at line 34
$this
addMiddleware(Middleware $middleware)
at line 63
__construct(bool $trackMetadata = false, int $middlewareFlag)
Construct a delta collection
in MemoryConfigCollection at line 59
static MemoryConfigCollection
create()
in MemoryConfigCollection at line 70
$this
transform(TransformerInterface[] $transformers)
Trigger transformers to load into this store
at line 169
$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.
in MemoryConfigCollection at line 97
mixed
get(string $class, string $name = null, int|true $excludeMiddleware)
Fetches value for a class, or a property on that class
in MemoryConfigCollection at line 152
bool
exists(string $class, string $name = null, int|true $excludeMiddleware)
Checks to see if a config item exists, or a property on that class
at line 187
$this
remove(string $class, string $name = null)
Remove config for a given class, or field on that class
at line 219
removeAll()
Delete all entries
in MemoryConfigCollection at line 190
array
getAll()
Get complete config (excludes middleware-applied config)
in MemoryConfigCollection at line 205
$this
update(string $class, string $name, mixed $value)
deprecated
deprecated 4.0...5.0 Synonym for merge()
at line 204
$this
merge(string $class, string $name, mixed $value)
Merge a config for a class, or a field on that class
in MemoryConfigCollection at line 224
array
getMetadata()
Returns the entire metadata
in MemoryConfigCollection at line 233
getHistory()
in MemoryConfigCollection at line 255
serialize()
at line 148
unserialize($serialized)
in MemoryConfigCollection at line 273
ConfigCollectionInterface
nest()
Get nested version of this config, which is normally duplicated version of this config, but could be a subclass.
at line 77
static DeltaConfigCollection
createFromCollection(ConfigCollectionInterface $parent, int $middlewareFlag)
Create a delta collection from a parent collection
at line 100
DeltaMiddleware
getDeltaMiddleware()
Get middleware for handling deltas
at line 118
array
getDeltas(string $class)
Get deltas for the given class
at line 132
bool
isDeltaReset(string $class = null)
Check if config should be completely reset before getting config