1111
1212namespace Symfony \Component \HttpKernel \DataCollector ;
1313
14+ use Symfony \Component \EventDispatcher \Debug \TraceableEventDispatcher ;
15+ use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
1416use Symfony \Component \HttpFoundation \Request ;
1517use Symfony \Component \HttpFoundation \Response ;
16- use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
17- use Symfony \Component \EventDispatcher \Debug \TraceableEventDispatcherInterface ;
1818
1919/**
2020 * EventDataCollector.
@@ -53,7 +53,7 @@ public function reset()
5353
5454public function lateCollect ()
5555 {
56- if ($ this ->dispatcher instanceof TraceableEventDispatcherInterface ) {
56+ if ($ this ->dispatcher instanceof TraceableEventDispatcher ) {
5757$ this ->setCalledListeners ($ this ->dispatcher ->getCalledListeners ());
5858$ this ->setNotCalledListeners ($ this ->dispatcher ->getNotCalledListeners ());
5959$ this ->setOrphanedEvents ($ this ->dispatcher ->getOrphanedEvents ());
@@ -66,67 +66,67 @@ public function lateCollect()
6666 *
6767 * @param array $listeners An array of called listeners
6868 *
69- * @seeTraceableEventDispatcherInterface
69+ * @seeTraceableEventDispatcher
7070 */
7171public function setCalledListeners (array $ listeners )
7272 {
7373$ this ->data ['called_listeners ' ] =$ listeners ;
7474 }
7575
7676/**
77- *Gets the called listeners.
77+ *Sets the not called listeners.
7878 *
79- * @return array An array of called listeners
79+ * @param array$listeners An array of not called listeners
8080 *
81- * @seeTraceableEventDispatcherInterface
81+ * @seeTraceableEventDispatcher
8282 */
83- public function getCalledListeners ( )
83+ public function setNotCalledListeners ( array $ listeners )
8484 {
85- return $ this ->data ['called_listeners ' ] ;
85+ $ this ->data ['not_called_listeners ' ] = $ listeners ;
8686 }
8787
8888/**
89- * Sets thenot called listeners .
89+ * Sets theorphaned events .
9090 *
91- * @param array $listeners An array ofnot called listeners
91+ * @param array $events An array oforphaned events
9292 *
93- * @seeTraceableEventDispatcherInterface
93+ * @seeTraceableEventDispatcher
9494 */
95- public function setNotCalledListeners (array $ listeners )
95+ public function setOrphanedEvents (array $ events )
9696 {
97- $ this ->data ['not_called_listeners ' ] =$ listeners ;
97+ $ this ->data ['orphaned_events ' ] =$ events ;
9898 }
9999
100100/**
101- * Gets thenot called listeners.
101+ * Gets the called listeners.
102102 *
103- * @return array An array ofnot called listeners
103+ * @return array An array of called listeners
104104 *
105- * @seeTraceableEventDispatcherInterface
105+ * @seeTraceableEventDispatcher
106106 */
107- public function getNotCalledListeners ()
107+ public function getCalledListeners ()
108108 {
109- return $ this ->data ['not_called_listeners ' ];
109+ return $ this ->data ['called_listeners ' ];
110110 }
111111
112112/**
113- *Sets theorphaned events .
113+ *Gets thenot called listeners .
114114 *
115- * @param array$events An array oforphaned events
115+ * @return array An array ofnot called listeners
116116 *
117- * @seeTraceableEventDispatcherInterface
117+ * @seeTraceableEventDispatcher
118118 */
119- public function setOrphanedEvents ( array $ events )
119+ public function getNotCalledListeners ( )
120120 {
121- $ this ->data ['orphaned_events ' ] = $ events ;
121+ return $ this ->data ['not_called_listeners ' ] ;
122122 }
123123
124124/**
125125 * Gets the orphaned events.
126126 *
127127 * @return array An array of orphaned events
128128 *
129- * @seeTraceableEventDispatcherInterface
129+ * @seeTraceableEventDispatcher
130130 */
131131public function getOrphanedEvents ()
132132 {