1 | <?php |
||
13 | class FilePathCache implements CacheInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var string Holds the cache directory. |
||
17 | */ |
||
18 | protected $dir; |
||
19 | |||
20 | /** |
||
21 | * @var string The filename we'll be caching for. |
||
22 | */ |
||
23 | protected $filename; |
||
24 | |||
25 | /** |
||
26 | * @var string Holds the cachedFile string |
||
27 | */ |
||
28 | protected $cachedFile; |
||
29 | |||
30 | /** |
||
31 | * Constructor |
||
32 | * |
||
33 | * @param string $dir The directory to cache in |
||
34 | * @param string $filename The filename we'll be caching for. |
||
35 | */ |
||
36 | public function __construct($dir, $filename) |
||
41 | |||
42 | /** |
||
43 | * {@inheritDoc} |
||
44 | */ |
||
45 | public function has($key) |
||
49 | |||
50 | /** |
||
51 | * {@inheritDoc} |
||
52 | */ |
||
53 | public function get($key) |
||
63 | |||
64 | /** |
||
65 | * {@inheritDoc} |
||
66 | */ |
||
67 | public function set($key, $value) |
||
94 | |||
95 | /** |
||
96 | * {@inheritDoc} |
||
97 | */ |
||
98 | public function remove($key) |
||
112 | |||
113 | /** |
||
114 | * Get the path-to-file. |
||
115 | * @return string Cache path |
||
116 | */ |
||
117 | protected function cachedFile() |
||
125 | } |
||
126 |