| Conditions | 4 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | private function getRulesFromCache($file) { |
||
| 13 | //The cache for the key: the filename and template prefix |
||
| 14 | //Each template may have a different prefix which changes the parsed TSS, |
||
| 15 | //Because of this the cache needs to be generated for each template prefix. |
||
| 16 | $key = $this->getCacheKey($file); |
||
| 17 | //Try to load the cached rules, if not set in the cache (or expired) parse the supplied sheet |
||
| 18 | $rules = $this->cache->load($key, filemtime($file)); |
||
| 19 | if ($rules) { |
||
| 20 | foreach ($rules['import'] as $file) { |
||
| 21 | if (!$this->cache->load($this->getCacheKey($file), filemtime($file))) return false; |
||
| 22 | } |
||
| 23 | } |
||
| 24 | return $rules; |
||
| 25 | } |
||
| 26 | |||
| 40 |