11 use Zend\EventManager\EventInterface;
12 use Zend\ModuleManager\Feature\BootstrapListenerInterface;
13 use Zend\ModuleManager\Feature\ConfigProviderInterface;
14 use Zend\Mvc\ModuleRouteListener;
15 use Zend\Mvc\MvcEvent;
18 BootstrapListenerInterface,
19 ConfigProviderInterface
24 public function onBootstrap(EventInterface $e)
32 $sharedEvents = $events->getSharedManager();
34 $moduleRouteListener =
new ModuleRouteListener();
35 $moduleRouteListener->attach($events);
40 $sharedEvents->attach(
41 \
Zend\Stdlib\DispatchableInterface::class,
42 MvcEvent::EVENT_DISPATCH,
43 [$injectTemplateListener,
'injectTemplate'],
50 $headers->addHeaderLine(
'Cache-Control',
'no-cache, no-store, must-revalidate');
51 $headers->addHeaderLine(
'Pragma',
'no-cache');
52 $headers->addHeaderLine(
'Expires',
'1970-01-01');
53 $headers->addHeaderLine(
'X-Frame-Options: SAMEORIGIN');
54 $headers->addHeaderLine(
'X-Content-Type-Options: nosniff');
56 $userAgentHeader = $e->getRequest()->getHeader(
'User-Agent');
57 $xssHeaderValue = $userAgentHeader && $userAgentHeader->getFieldValue()
60 $headers->addHeaderLine(
'X-XSS-Protection: ' . $xssHeaderValue);
70 $result = array_merge_recursive(
71 include
__DIR__ .
'/../../../config/module.config.php',
72 include
__DIR__ .
'/../../../config/router.config.php',
73 include
__DIR__ .
'/../../../config/di.config.php',
74 include
__DIR__ .
'/../../../config/states.install.config.php',
75 include
__DIR__ .
'/../../../config/states.update.config.php',
76 include
__DIR__ .
'/../../../config/states.home.config.php',
77 include
__DIR__ .
'/../../../config/states.extensionManager.config.php',
78 include
__DIR__ .
'/../../../config/states.upgrade.config.php',
79 include
__DIR__ .
'/../../../config/states.uninstall.config.php',
80 include
__DIR__ .
'/../../../config/states.enable.config.php',
81 include
__DIR__ .
'/../../../config/states.disable.config.php',
82 include
__DIR__ .
'/../../../config/languages.config.php',
83 include
__DIR__ .
'/../../../config/marketplace.config.php'
defined('TESTS_BP')||define('TESTS_BP' __DIR__