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 | 
Properties
| protected | Middleware[] | $middlewares | from MiddlewareAware | |
| protected | array | $config | Stores a list of key/value config prior to middleware being applied | from MemoryConfigCollection | 
| protected | array | $callCache | Call cache for non-trivial config calls including middleware | from MemoryConfigCollection | 
| protected | array | $metadata | from MemoryConfigCollection | |
| protected | array | $history | from MemoryConfigCollection | |
| protected | bool | $trackMetadata | from MemoryConfigCollection | |
| protected | DeltaMiddleware | $deltaMiddleware | ||
| protected | array | $deltas | List of deltas keyed by class | |
| protected | bool | $deltaReset | True if removeAll() is applied | 
Methods
Call middleware to get decorated class config
Construct a delta collection
Sets config for a given field.
Fetches value for a class, or a property on that class
Retrieve config for an entire 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
Merge a config for a class, or a field on that class
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
Check if config should be completely reset before getting config
Remove all deltas for the given class and/or key combination
Details
        
                            Middleware[]
    getMiddlewares()
        
    
    No description
        
                            $this
    setMiddlewares(Middleware[] $middlewares)
        
    
    No description
        
                            $this
    addMiddleware(Middleware $middleware)
        
    
    No description
        
                    protected        array
    callMiddleware(string $class, int|bool $excludeMiddleware, callable $last)
        
    
    Call middleware to get decorated class config
        
                            
    __construct(bool $trackMetadata = false, int $middlewareFlag = 0)
        
    
    Construct a delta collection
        
                static            MemoryConfigCollection
    create()
        
    
    No description
        
                            $this
    transform(TransformerInterface[] $transformers)
        
    
    Trigger transformers to load into this store
        
                            MutableConfigCollectionInterface
    set(string $class, string|null $name, mixed $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
        
                            void
    checkForDeprecatedConfig($class, $name)
        
    
    No description
        
                    protected        array
    getClassConfig(string $class, int|true $excludeMiddleware = 0)
        
    
    Retrieve config for an entire 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
        
                            MutableConfigCollectionInterface
    remove(string $class, string|null $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)
        
                            MutableConfigCollectionInterface
    merge(string $class, string $name, array $value)
        
    
    Merge a config for a class, or a field on that class
        
                            array
    getMetadata()
        
    
    Returns the entire metadata
        
                            
    getHistory()
        
    
    No description
        
                    protected        array
    getSerializedMembers()
        
    
    Get list of serialized properties
        
                            array
    __serialize()
        
    
    No description
        
                            void
    __unserialize(array $data)
        
    
    No description
        
                            ConfigCollectionInterface
    nest()
        
    
    Get nested version of this config, which is normally duplicated version of this config, but could be a subclass.
        
                    protected        
    saveMetadata(string $class, array $metadata)
        
    
    Save metadata for the given class
        
                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
        
                            
    __clone()
        
    
    No description
        
                    protected        
    postInit()
        
    
    Restore back-links post-creation or unserialization
        
                    protected        
    clearDeltas(string $class = null, string $key = null)
        
    
    Remove all deltas for the given class and/or key combination
        
                    protected        
    addDelta(string $class, array $delta)
        
    
    Push new delta