1 | <?php |
||
32 | class StorageDriver extends DriverAbstract |
||
33 | { |
||
34 | /** |
||
35 | * Storage backend |
||
36 | * |
||
37 | * @var Storage |
||
38 | * @access protected |
||
39 | */ |
||
40 | protected $storage; |
||
41 | |||
42 | /** |
||
43 | * Cache directory in storage |
||
44 | * |
||
45 | * @var string |
||
46 | * @access protected |
||
47 | */ |
||
48 | protected $cache_dir; |
||
49 | |||
50 | /** |
||
51 | * Inject storage object |
||
52 | * |
||
53 | * @param Storage $storage |
||
54 | * @param string $cacheDir |
||
55 | * @param array $properties |
||
56 | * @access public |
||
57 | */ |
||
58 | public function __construct( |
||
67 | |||
68 | /** |
||
69 | * {@inheritDoc} |
||
70 | */ |
||
71 | public function save(CacheItemInterface $item)/*# : bool */ |
||
86 | |||
87 | /** |
||
88 | * {@inheritDoc} |
||
89 | */ |
||
90 | protected function driverHas(/*# string */ $key)/*# : array */ |
||
107 | |||
108 | /** |
||
109 | * {@inheritDoc} |
||
110 | */ |
||
111 | protected function driverGet(/*# string */ $key) |
||
117 | |||
118 | /** |
||
119 | * {@inheritDoc} |
||
120 | */ |
||
121 | protected function driverDelete(CacheItemInterface $item)/*# : bool */ |
||
127 | |||
128 | /** |
||
129 | * {@inheritDoc} |
||
130 | */ |
||
131 | protected function driverClear()/*# : bool */ |
||
136 | |||
137 | /** |
||
138 | * Generate full path in storage base on the given key |
||
139 | * |
||
140 | * @param string $key |
||
141 | * @access protected |
||
142 | */ |
||
143 | protected function getPath(/*# string */ $key)/*# : string */ |
||
147 | |||
148 | /** |
||
149 | * Reset to storage error |
||
150 | * |
||
151 | * @return false |
||
152 | * @access protected |
||
153 | */ |
||
154 | protected function resetError()/*# : bool */ |
||
159 | } |
||
160 |