StorageCacheAbstractServiceFactory
in package
implements
AbstractFactoryInterface
Uses
PluginManagerLookupTrait
Storage cache factory for multiple caches.
Interfaces, Classes, Traits and Enums
- AbstractFactoryInterface
- Backwards-compatibility shim for AbstractFactoryInterface.
Table of Contents
- $config : array<string|int, mixed>
- $configKey : string
- Configuration key for cache objects
- __invoke() : object
- Create an object
- canCreate() : bool
- canCreateServiceWithName() : bool
- Determine if we can create a service with name
- createServiceWithName() : mixed
- Create service with name
- getConfig() : array<string|int, mixed>
- Retrieve cache configuration, if any
- lookupStorageAdapterPluginManager() : AdapterPluginManager
- Lookup the storage adapter plugin manager.
- lookupStoragePluginManager() : PluginManager
- Lookup the storage plugins plugin manager.
- prepareStorageFactory() : void
- Prepare the storage factory with the adapter and plugins plugin managers.
Properties
$config
protected
array<string|int, mixed>
$config
$configKey
Configuration key for cache objects
protected
string
$configKey
= 'caches'
Methods
__invoke()
Create an object
public
__invoke(ContainerInterface $container, string $requestedName[, null|array<string|int, mixed> $options = null ]) : object
Parameters
- $container : ContainerInterface
- $requestedName : string
- $options : null|array<string|int, mixed> = null
Return values
object —canCreate()
public
canCreate(ContainerInterface $container, string $requestedName) : bool
Parameters
- $container : ContainerInterface
- $requestedName : string
Return values
bool —canCreateServiceWithName()
Determine if we can create a service with name
public
canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, string $name, string $requestedName) : bool
Parameters
- $serviceLocator : ServiceLocatorInterface
- $name : string
- $requestedName : string
Return values
bool —createServiceWithName()
Create service with name
public
createServiceWithName(ServiceLocatorInterface $serviceLocator, mixed $name, mixed $requestedName) : mixed
Parameters
- $serviceLocator : ServiceLocatorInterface
- $name : mixed
- $requestedName : mixed
Return values
mixed —getConfig()
Retrieve cache configuration, if any
protected
getConfig(ContainerInterface $container) : array<string|int, mixed>
Parameters
- $container : ContainerInterface
Return values
array<string|int, mixed> —lookupStorageAdapterPluginManager()
Lookup the storage adapter plugin manager.
private
lookupStorageAdapterPluginManager(ContainerInterface $container) : AdapterPluginManager
Returns the Zend\Cache\Storage\AdapterPluginManager service if present, or creates a new instance otherwise.
Parameters
- $container : ContainerInterface
Return values
AdapterPluginManager —lookupStoragePluginManager()
Lookup the storage plugins plugin manager.
private
lookupStoragePluginManager(ContainerInterface $container) : PluginManager
Returns the Zend\Cache\Storage\PluginManager service if present, or creates a new instance otherwise.
Parameters
- $container : ContainerInterface
Return values
PluginManager —prepareStorageFactory()
Prepare the storage factory with the adapter and plugins plugin managers.
private
prepareStorageFactory(ContainerInterface $container) : void
Parameters
- $container : ContainerInterface