// 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();
} public static function getSubscribedEvents(): array
{ return [ KernelEvents::RESPONSE =>
['onKernelResponse', -100
],
KernelEvents::EXCEPTION =>
['onKernelException', 0
],