| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 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 | |||
| 71 |