1 | <?php |
||
15 | class BusinessEntityCacheReader |
||
16 | { |
||
17 | protected $cache; |
||
18 | protected $widgetHelper; |
||
19 | protected $driver; // @victoire_business_entity.annotation_driver |
||
20 | |||
21 | /** |
||
22 | * Constructor. |
||
23 | * |
||
24 | * @param VictoireCache $cache |
||
25 | * @param WidgetHelper $widgetHelper |
||
26 | * @param AnnotationDriver $driver If cache returns empty results, we try to refectch data |
||
27 | */ |
||
28 | public function __construct(VictoireCache $cache, WidgetHelper $widgetHelper, AnnotationDriver $driver) |
||
34 | |||
35 | /** |
||
36 | * @param string $widgetName |
||
37 | * |
||
38 | * @return array |
||
39 | */ |
||
40 | public function getReceiverProperties($widgetName) |
||
50 | |||
51 | /** |
||
52 | * Fetch in Cache system and try to reparse Annotation if no results. |
||
53 | * |
||
54 | * @param $key |
||
55 | * |
||
56 | * @throws \Doctrine\ORM\Mapping\MappingException |
||
57 | * |
||
58 | * @return mixed |
||
59 | */ |
||
60 | protected function fetch($key) |
||
74 | } |
||
75 |