1 | <?php |
||
20 | class CacheAdapterFactory |
||
21 | { |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $cacheDir; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $callbacks = []; |
||
31 | |||
32 | 48 | public function __construct($cacheDir = null) |
|
52 | |||
53 | /** |
||
54 | * registers a callback to resolve a cache adapter interface |
||
55 | * |
||
56 | * @param callable $callback |
||
57 | * @return $this |
||
58 | */ |
||
59 | 48 | public function registerCallback(callable $callback) |
|
60 | { |
||
61 | 48 | $this->callbacks[] = $callback; |
|
62 | |||
63 | 48 | return $this; |
|
64 | } |
||
65 | |||
66 | /** |
||
67 | * returns the cache adapter interface for the application cache |
||
68 | * |
||
69 | * @param $cache |
||
70 | * @return CacheAdapterInterface|CacheItemPoolInterface |
||
71 | * @throws \InvalidArgumentException |
||
72 | */ |
||
73 | 48 | public function get($cache = null) |
|
96 | |||
97 | /** |
||
98 | * creates a default cache adapter if no cache has been provided |
||
99 | * |
||
100 | * @return CacheAdapterInterface|null |
||
101 | */ |
||
102 | 34 | protected function getDefaultCache() |
|
120 | } |
||
121 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.