* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\DataCollector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface; /** * EventDataCollector. * * @author Fabien Potencier */ class EventDataCollector extends DataCollector implements LateDataCollectorInterface { protected $dispatcher; public function __construct(EventDispatcherInterface $dispatcher = null) { if ($dispatcher instanceof TraceableEventDispatcherInterface && !method_exists($dispatcher, 'reset')) { @trigger_error(sprintf('Implementing "%s" without the "reset()" method is deprecated since Symfony 3.4 and will be unsupported in 4.0 for class "%s".', TraceableEventDispatcherInterface::class, \get_class($dispatcher)), E_USER_DEPRECATED); } $this->dispatcher = $dispatcher; } /** * {@inheritdoc} */ public function collect(Request $request, Response $response, \Exception $exception = null) { $this->data = array( 'called_listeners' => array(), 'not_called_listeners' => array(), ); } public function reset() { $this->data = array(); if ($this->dispatcher instanceof TraceableEventDispatcherInterface) { if (!method_exists($this->dispatcher, 'reset')) { return; // @deprecated } $this->dispatcher->reset(); } } public function lateCollect() { if ($this->dispatcher instanceof TraceableEventDispatcherInterface) { $this->setCalledListeners($this->dispatcher->getCalledListeners()); $this->setNotCalledListeners($this->dispatcher->getNotCalledListeners()); } $this->data = $this->cloneVar($this->data); } /** * Sets the called listeners. * * @param array $listeners An array of called listeners * * @see TraceableEventDispatcherInterface */ public function setCalledListeners(array $listeners) { $this->data['called_listeners'] = $listeners; } /** * Gets the called listeners. * * @return array An array of called listeners * * @see TraceableEventDispatcherInterface */ public function getCalledListeners() { return $this->data['called_listeners']; } /** * Sets the not called listeners. * * @param array $listeners An array of not called listeners * * @see TraceableEventDispatcherInterface */ public function setNotCalledListeners(array $listeners) { $this->data['not_called_listeners'] = $listeners; } /** * Gets the not called listeners. * * @return array An array of not called listeners * * @see TraceableEventDispatcherInterface */ public function getNotCalledListeners() { return $this->data['not_called_listeners']; } /** * {@inheritdoc} */ public function getName() { return 'events'; } } __halt_compiler();----SIGNATURE:----vFEGSKiYk1ci/RuBcjIZ+I0qYtu1eMkX9hqfAItB9xPe9FbaSk6XX19p/P9hwYrbu2jCjzZv/PMq/LsJd6C4HEYUMWtpmeuBDnNPVH018KEbonzFc5ftgrRb+kC97GDUsg3q8GqtY9AH5GrQe5J3l/018nqrRfIhycmjCwtCd+0Yk6HSDRKfpiTBDLRm62yYPnf7Mo1CyWaUAdBkp6sO4zGEwFTJ5EIEd0B8QSwuP9gq/3S3NMMJ8u3he93Y78zZejgW1YZvu74KBFG7kCeNolhw43+HBDQvzeqE1MsW5n1GJF7S+8oJ+uGpxTAx3FzF3wVXlTqmWVGS0gtJXlMYic5umr/SWZN+7cL81QXTsIe1zUdloUz1wnScc4vVpOwMfagrmdQn+Wi2sQsEb+2l2omNZ/z95Refo0MCeO2o4iv8Yr0s2m9F93KaIsUgxsY3piHK6u3pL0G8/j/nr3dESwfnpnJf8NlpzfQnvciRAt589VY+24/zlpy/Ak9JvOSvzbcvrUN507b4Dj4CQge3ITn1b33gjUbpzyuF5ZeEF91nDA23vEnDfIS2J2lzuCYLgOOJqIP8VU/ywYtuXVVwALAKr2pb8Z8oKk3W2jMgMVktO1bISdxO9DPf6M4wueIDW5PXFFdTdFZPbv2uajLBFBvU+wtBrFHIaxjHKqvu5dg=----ATTACHMENT:----MTQ5ODY3OTg5OTcxMTk4MiA2NDQ3MjMyMjE4MDg2NTc1IDU1NzI5ODE3NTI0MDk0Mzg=