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