public function onFinishRequestPre(FinishRequestEvent $event) { if ($event->getRequestType() !== HttpKernelInterface::MASTER_REQUEST) { return; } $key = $this->pageStack->isAdmin() ? 'backend' : 'frontend'; $this->log($key, microtime(true) - $this->start); }
/** * Listener resets cwd to its value prior to drupal_bootstrap. * * This is probably unnecessary because the cwd for Symfony web processes * is already the web root. * * @param FinishRequestEvent $event */ public function onKernelPostController(FinishRequestEvent $event) { if (HttpKernelInterface::MASTER_REQUEST === $event->getRequestType()) { chdir($this->cwd); } }
/** * @param FinishRequestEvent $event */ public function onFinish(FinishRequestEvent $event) { if ($event->getRequestType() == HttpKernelInterface::MASTER_REQUEST) { $this->profiler->profile($event->getRequest()); } }