@@ 33-43 (lines=11) @@ | ||
30 | return $rules; |
|
31 | } |
|
32 | ||
33 | public function getCacheKey($tss, $data) { |
|
34 | //Read the rules so that $this->cacheKey is set |
|
35 | if (is_file($tss)) $this->getRulesFromCache($tss); |
|
36 | if ($this->cacheKey) { |
|
37 | $parser = new Parser\Value($data); |
|
38 | $parsedKey = $parser->parseTokens($this->cacheKey)[0]; |
|
39 | $this->cacheName = $parsedKey . $this->tss; |
|
40 | return $parsedKey; |
|
41 | } |
|
42 | else return ''; |
|
43 | } |
|
44 | ||
45 | ||
46 | //write the sheet to cache |
@@ 56-65 (lines=10) @@ | ||
53 | return false; |
|
54 | } |
|
55 | ||
56 | public function getCacheKey($data) { |
|
57 | $this->getRulesFromCache($this->fileName); |
|
58 | if ($this->cacheKey) { |
|
59 | $parser = new \Transphporm\Parser\Value($data); |
|
60 | $cacheKey = $parser->parseTokens($this->cacheKey)[0]; |
|
61 | $this->cacheName = $cacheKey . $this->fileName; |
|
62 | return $cacheKey; |
|
63 | } |
|
64 | else return ''; |
|
65 | } |
|
66 | ||
67 | public function getRules($cssToXpath, $valueParser, $sheetLoader, $indexStart) { |
|
68 | $rules = $this->getRulesFromCache($this->fileName)['rules']; |