Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | private function getResult(array $queryParameters, array $uriParameters, $cacheResult = false) |
||
44 | { |
||
45 | $hash = md5(serialize($queryParameters) . serialize($uriParameters)); |
||
46 | if (isset($this->cachedResults[$hash])) { |
||
47 | return $this->cachedResults[$hash]; |
||
48 | } |
||
49 | |||
50 | $result = $this->api->getPaginated($queryParameters, $uriParameters); |
||
51 | if ($cacheResult) { |
||
52 | $this->cachedResults = array(); |
||
53 | $this->cachedResults[$hash] = $result; |
||
54 | } |
||
55 | |||
56 | return $result; |
||
57 | } |
||
58 | } |
||
59 |