1 | <?php |
||
18 | class DisplayControllerGet extends AbstractController |
||
19 | { |
||
20 | /** |
||
21 | * The cache item pool. |
||
22 | * |
||
23 | * @var CacheItemPoolInterface |
||
24 | * @since 1.0 |
||
25 | */ |
||
26 | private $cache; |
||
27 | |||
28 | /** |
||
29 | * JSON view for displaying the statistics. |
||
30 | * |
||
31 | * @var StatsJsonView |
||
32 | * @since 1.0 |
||
33 | */ |
||
34 | private $view; |
||
35 | |||
36 | /** |
||
37 | * Constructor. |
||
38 | * |
||
39 | * @param StatsJsonView $view JSON view for displaying the statistics. |
||
40 | * @param CacheItemPoolInterface $cache The cache item pool. |
||
41 | * |
||
42 | * @since 1.0 |
||
43 | */ |
||
44 | 1 | public function __construct(StatsJsonView $view, CacheItemPoolInterface $cache) |
|
49 | |||
50 | /** |
||
51 | * Execute the controller. |
||
52 | * |
||
53 | * @return boolean |
||
54 | * |
||
55 | * @since 1.0 |
||
56 | */ |
||
57 | 2 | public function execute() |
|
105 | |||
106 | /** |
||
107 | * Store the given data to the cache pool. |
||
108 | * |
||
109 | * @param string $key The key for the cache item. |
||
110 | * @param mixed $data The data to be stored to cache. |
||
111 | * |
||
112 | * @return void |
||
113 | * |
||
114 | * @since 1.0 |
||
115 | */ |
||
116 | 1 | private function cacheData($key, $data) |
|
123 | } |
||
124 |