public function ProfilerSubscriber::onKernelFinishRequest in Devel 8
Same name and namespace in other branches
- 8.3 webprofiler/src/EventSubscriber/ProfilerSubscriber.php \Drupal\webprofiler\EventSubscriber\ProfilerSubscriber::onKernelFinishRequest()
- 8.2 webprofiler/src/EventSubscriber/ProfilerSubscriber.php \Drupal\webprofiler\EventSubscriber\ProfilerSubscriber::onKernelFinishRequest()
- 4.x webprofiler/src/EventSubscriber/ProfilerSubscriber.php \Drupal\webprofiler\EventSubscriber\ProfilerSubscriber::onKernelFinishRequest()
File
- webprofiler/
src/ EventSubscriber/ ProfilerSubscriber.php, line 92
Class
Namespace
Drupal\webprofiler\EventSubscriberCode
public function onKernelFinishRequest(FinishRequestEvent $event) {
// attach children to parents
foreach ($this->profiles as $request) {
if (NULL !== ($parentRequest = $this->parents[$request])) {
if (isset($this->profiles[$parentRequest])) {
$this->profiles[$parentRequest]
->addChild($this->profiles[$request]);
}
}
}
// save profiles
foreach ($this->profiles as $request) {
$this->profiler
->saveProfile($this->profiles[$request]);
}
$this->profiles = new \SplObjectStorage();
$this->parents = new \SplObjectStorage();
}