public function onRequest(GetResponseEvent $event)
{
if (HttpKernel::MASTER_REQUEST != $event->getRequestType()) {
// don't do anything if it's not the master request
return;
}
$request = $event->getRequest();
$pos = strpos($request->server->get('REQUEST_URI'), '_profiler');
// don't call Zend Application for profiler.
if (false === $pos) {
// init adodb
require_once __DIR__ . '/../../../../db_connect.php';
// Fill zend application options
$config = $this->container->getParameterBag()->all();
$application = new \Zend_Application(APPLICATION_ENV);
$application->setOptions($config);
$application->bootstrap();
\Zend_Registry::set('zend_application', $application);
}
}