MemoryConfigCollection
class MemoryConfigCollection implements MutableConfigCollectionInterface, Serializable
Basic mutable config collection stored in memory
Traits
Methods
ConfigCollection constructor.
No description
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
Get complete config (excludes middleware-applied config)
Merge a config for a class, or a field on that class
Returns the entire metadata
No description
No description
No description
Get nested version of this config, which is normally duplicated version of this config, but could be a subclass.
Details
in MiddlewareAware at line 15
Middleware[]
getMiddlewares()
in MiddlewareAware at line 24
$this
setMiddlewares(Middleware[] $middlewares)
in MiddlewareAware at line 34
$this
addMiddleware(Middleware $middleware)
at line 51
__construct(bool $trackMetadata = false)
ConfigCollection constructor.
at line 59
static MemoryConfigCollection
create()
at line 70
$this
transform(TransformerInterface[] $transformers)
Trigger transformers to load into this store
at line 78
$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.
at line 97
mixed
get(string $class, string $name = null, int|true $excludeMiddleware)
Fetches value for a class, or a property on that class
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 164
$this
remove(string $class, string $name = null)
Remove config for a given class, or field on that class
at line 177
removeAll()
Delete all entries
at line 190
array
getAll()
Get complete config (excludes middleware-applied config)
at line 205
$this
update(string $class, string $name, mixed $value)
deprecated
deprecated 4.0...5.0 Synonym for merge()
at line 211
$this
merge(string $class, string $name, mixed $value)
Merge a config for a class, or a field on that class
at line 224
array
getMetadata()
Returns the entire metadata
at line 233
getHistory()
at line 255
serialize()
at line 265
unserialize($serialized)
at line 273
ConfigCollectionInterface
nest()
Get nested version of this config, which is normally duplicated version of this config, but could be a subclass.