1 | <?php |
||
11 | class ProfilerStrategy implements CacheStrategyInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var CacheStrategyInterface |
||
15 | */ |
||
16 | private $cacheStrategy; |
||
17 | |||
18 | /** |
||
19 | * @var TwigCacheCollector |
||
20 | */ |
||
21 | private $dataCollector; |
||
22 | |||
23 | /** |
||
24 | * @param CacheStrategyInterface $cacheStrategy |
||
25 | * @param TwigCacheCollector $dataCollector |
||
26 | */ |
||
27 | public function __construct(CacheStrategyInterface $cacheStrategy, TwigCacheCollector $dataCollector) |
||
34 | |||
35 | /** |
||
36 | * Fetch the block for a given key. |
||
37 | * |
||
38 | * @param mixed $key |
||
39 | * |
||
40 | * @return mixed |
||
41 | */ |
||
42 | public function fetchBlock($key) |
||
49 | |||
50 | /** |
||
51 | * Generate a key for the value. |
||
52 | * |
||
53 | * @param string $annotation |
||
54 | * @param mixed $value |
||
55 | * |
||
56 | * @return mixed |
||
57 | */ |
||
58 | public function generateKey($annotation, $value) |
||
64 | |||
65 | /** |
||
66 | * Save the contents of a rendered block. |
||
67 | * |
||
68 | * @param mixed $key |
||
69 | * @param string $block |
||
70 | * |
||
71 | * @return mixed |
||
72 | */ |
||
73 | public function saveBlock($key, $block) |
||
77 | } |
||
78 |