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 | 6 | */ |
|
34 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
||
42 | |||
43 | /** |
||
44 | * @param ContainerInterface $container |
||
45 | 3 | * @return Cache\CacheProvider |
|
46 | */ |
||
47 | protected function getAdapter(ContainerInterface $container) |
||
61 | 1 | ||
62 | 1 | /** |
|
63 | 1 | * @param array $cacheConfig |
|
64 | * @return Cache\CacheProvider |
||
65 | 1 | */ |
|
66 | 1 | protected function resolveCacheAdapter(array $cacheConfig) |
|
95 | } |
||
96 |