Total Complexity | 6 |
Total Lines | 63 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class CacheManager extends \Nip\Cache\Manager |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var Records |
||
16 | */ |
||
17 | protected $_manager; |
||
18 | |||
19 | /** |
||
20 | * CacheManager constructor. |
||
21 | */ |
||
22 | public function __construct() |
||
23 | { |
||
24 | $this->active = (request()->getModuleName() == 'default'); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @param $cacheId |
||
29 | * @return string |
||
30 | */ |
||
31 | public function filePath($cacheId) |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @param bool $type |
||
40 | * @return string |
||
41 | */ |
||
42 | public function getCacheId($type = false) |
||
43 | { |
||
44 | $cacheId = $this->getManager()->getController() . '-' . $type; |
||
45 | |||
46 | return $cacheId; |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @return Records |
||
51 | */ |
||
52 | public function getManager() |
||
53 | { |
||
54 | return $this->_manager; |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * @param Records $manager |
||
59 | * @return $this |
||
60 | */ |
||
61 | public function setManager($manager) |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * @return string |
||
70 | */ |
||
71 | public function cachePath() |
||
74 | } |
||
75 | } |
||
76 |