public function ProfilerSubscriber::onKernelFinishRequest in Devel 8.3
Same name and namespace in other branches
- 8 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 103
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();
}