1 | <?php |
||
15 | class ShouldCacheStrategyListener extends AbstractListenerAggregate |
||
16 | { |
||
17 | /** |
||
18 | * @var StrategyInterface |
||
19 | */ |
||
20 | protected $strategy; |
||
21 | |||
22 | /** |
||
23 | * @param StrategyInterface $strategy |
||
24 | */ |
||
25 | public function __construct(StrategyInterface $strategy) |
||
29 | |||
30 | /** |
||
31 | * {@inheritDoc} |
||
32 | */ |
||
33 | public function attach(EventManagerInterface $events, $priority = 1) |
||
37 | |||
38 | /** |
||
39 | * @param CacheEvent $event |
||
40 | * @return bool |
||
41 | */ |
||
42 | public function shouldCache(CacheEvent $event) |
||
46 | |||
47 | /** |
||
48 | * @param StrategyInterface $strategy |
||
49 | */ |
||
50 | public function setStrategy($strategy) |
||
54 | |||
55 | /** |
||
56 | * @return StrategyInterface |
||
57 | */ |
||
58 | public function getStrategy() |
||
62 | } |
||
63 |