Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/http-kernel/DataCollector/EventDataCollector.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
25 { | 25 { |
26 protected $dispatcher; | 26 protected $dispatcher; |
27 | 27 |
28 public function __construct(EventDispatcherInterface $dispatcher = null) | 28 public function __construct(EventDispatcherInterface $dispatcher = null) |
29 { | 29 { |
30 if ($dispatcher instanceof TraceableEventDispatcherInterface && !method_exists($dispatcher, 'reset')) { | |
31 @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); | |
32 } | |
30 $this->dispatcher = $dispatcher; | 33 $this->dispatcher = $dispatcher; |
31 } | 34 } |
32 | 35 |
33 /** | 36 /** |
34 * {@inheritdoc} | 37 * {@inheritdoc} |
39 'called_listeners' => array(), | 42 'called_listeners' => array(), |
40 'not_called_listeners' => array(), | 43 'not_called_listeners' => array(), |
41 ); | 44 ); |
42 } | 45 } |
43 | 46 |
47 public function reset() | |
48 { | |
49 $this->data = array(); | |
50 | |
51 if ($this->dispatcher instanceof TraceableEventDispatcherInterface) { | |
52 if (!method_exists($this->dispatcher, 'reset')) { | |
53 return; // @deprecated | |
54 } | |
55 | |
56 $this->dispatcher->reset(); | |
57 } | |
58 } | |
59 | |
44 public function lateCollect() | 60 public function lateCollect() |
45 { | 61 { |
46 if ($this->dispatcher instanceof TraceableEventDispatcherInterface) { | 62 if ($this->dispatcher instanceof TraceableEventDispatcherInterface) { |
47 $this->setCalledListeners($this->dispatcher->getCalledListeners()); | 63 $this->setCalledListeners($this->dispatcher->getCalledListeners()); |
48 $this->setNotCalledListeners($this->dispatcher->getNotCalledListeners()); | 64 $this->setNotCalledListeners($this->dispatcher->getNotCalledListeners()); |
49 } | 65 } |
66 $this->data = $this->cloneVar($this->data); | |
50 } | 67 } |
51 | 68 |
52 /** | 69 /** |
53 * Sets the called listeners. | 70 * Sets the called listeners. |
54 * | 71 * |