| Total Complexity | 4 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class Module implements ConfigProviderInterface, BootstrapListenerInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Listen to the bootstrap event |
||
| 18 | */ |
||
| 19 | public function onBootstrap(EventInterface $e): void |
||
| 20 | { |
||
| 21 | // Only attach the Listener if the request came in through http(s) |
||
| 22 | if ($e instanceof MvcEvent && PHP_SAPI !== 'cli') { |
||
| 23 | $app = $e->getApplication(); |
||
| 24 | $app->getServiceManager()->get(Listener::class)->attach($app->getEventManager()); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Returns configuration to merge with application configuration |
||
| 30 | */ |
||
| 31 | public function getConfig(): iterable |
||
| 34 | } |
||
| 35 | } |
||
| 36 |