1 | <?php |
||
11 | class CacheFactory implements FactoryInterface |
||
12 | { |
||
13 | const VALID_CACHE_ADAPTERS = [ |
||
14 | Cache\ApcuCache::class, |
||
15 | Cache\ArrayCache::class, |
||
16 | Cache\FilesystemCache::class, |
||
17 | Cache\PhpFileCache::class, |
||
18 | Cache\MemcachedCache::class, |
||
19 | ]; |
||
20 | |||
21 | /** |
||
22 | * Create an object |
||
23 | * |
||
24 | * @param ContainerInterface $container |
||
25 | * @param string $requestedName |
||
26 | * @param null|array $options |
||
27 | * @return object |
||
28 | * @throws ServiceNotFoundException if unable to resolve the service. |
||
29 | * @throws ServiceNotCreatedException if an exception is raised when |
||
30 | * creating a service. |
||
31 | * @throws ContainerException if any other error occurs |
||
32 | */ |
||
33 | 6 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
47 | |||
48 | /** |
||
49 | * @param array $cacheConfig |
||
50 | * @return Cache\Cache |
||
51 | */ |
||
52 | 3 | protected function resolveCacheAdapter(array $cacheConfig) |
|
81 | } |
||
82 |