Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function get(ReflectionClass $reflectionClass, callable $resolver, string $key = '') |
||
25 | { |
||
26 | $cacheKey = $reflectionClass->getName() . '__' . $key; |
||
27 | $item = $this->classBoundCache->get($cacheKey); |
||
28 | if ($item !== null) { |
||
29 | return $item; |
||
30 | } |
||
31 | |||
32 | $item = $resolver(); |
||
33 | |||
34 | $this->classBoundCache->set($cacheKey, $item, $reflectionClass); |
||
35 | |||
36 | return $item; |
||
37 | } |
||
39 |