1 | <?php |
||
15 | class Module implements |
||
16 | Feature\AutoloaderProviderInterface, |
||
17 | Feature\ConfigProviderInterface, |
||
18 | Feature\ViewHelperProviderInterface |
||
19 | { |
||
20 | |||
21 | 1 | public function onBootstrap(MvcEvent $e) |
|
22 | { |
||
23 | // attach the cache listener, if caching is enabled |
||
24 | 1 | $sm = $e->getApplication()->getServiceManager(); |
|
25 | 1 | $config = $sm->get('config'); |
|
26 | 1 | if ($config['magl_markdown']['cache_enabled']) { |
|
27 | 1 | $em = $e->getApplication()->getEventManager(); |
|
28 | /** @var CacheListener $listener */ |
||
29 | 1 | $listener = $sm->get('MaglMarkdown\CacheListener'); |
|
30 | 1 | $listener->attach($em); |
|
31 | } |
||
32 | 1 | } |
|
33 | |||
34 | /** |
||
35 | * @return array |
||
36 | */ |
||
37 | 4 | public function getConfig() |
|
41 | |||
42 | /** |
||
43 | * @return array |
||
44 | */ |
||
45 | 1 | public function getAutoloaderConfig() |
|
55 | |||
56 | /** |
||
57 | * @return array |
||
58 | */ |
||
59 | 1 | public function getViewHelperConfig() |
|
70 | } |
||
71 |