CacheAdapterFactory
in package
implements
FromConfigInterface
Generates cache adapters from any number of known cache implementations
Interfaces, Classes and Traits
- FromConfigInterface
- Interfaces that adds a factory method which is used to instantiate a class from an array of configuration options.
Table of Contents
- factory() : CacheAdapterInterface
- Create a Guzzle cache adapter based on an array of options
- fromCache() : CacheAdapterInterface
- Create a Guzzle cache adapter based on an array of options
- createObject() : mixed
- Create a class using an array of constructor arguments
Methods
factory()
Create a Guzzle cache adapter based on an array of options
public
static factory([array<string|int, mixed> $config = array() ]) : CacheAdapterInterface
Parameters
- $config : array<string|int, mixed> = array()
-
Array of configuration options
Tags
Return values
CacheAdapterInterface —fromCache()
Create a Guzzle cache adapter based on an array of options
public
static fromCache(mixed $cache) : CacheAdapterInterface
Parameters
- $cache : mixed
-
Cache value
Tags
Return values
CacheAdapterInterface —createObject()
Create a class using an array of constructor arguments
private
static createObject(string $className[, array<string|int, mixed> $args = null ]) : mixed
Parameters
- $className : string
-
Class name
- $args : array<string|int, mixed> = null
-
Arguments for the class constructor