11
11
12
12
namespace Symfony \Component \HttpKernel \DataCollector ;
13
13
14
+ use Symfony \Component \EventDispatcher \Debug \TraceableEventDispatcher ;
15
+ use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
14
16
use Symfony \Component \HttpFoundation \Request ;
15
17
use Symfony \Component \HttpFoundation \Response ;
16
- use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
17
- use Symfony \Component \EventDispatcher \Debug \TraceableEventDispatcherInterface ;
18
18
19
19
/**
20
20
* EventDataCollector.
@@ -53,7 +53,7 @@ public function reset()
53
53
54
54
public function lateCollect ()
55
55
{
56
- if ($ this ->dispatcher instanceof TraceableEventDispatcherInterface ) {
56
+ if ($ this ->dispatcher instanceof TraceableEventDispatcher ) {
57
57
$ this ->setCalledListeners ($ this ->dispatcher ->getCalledListeners ());
58
58
$ this ->setNotCalledListeners ($ this ->dispatcher ->getNotCalledListeners ());
59
59
$ this ->setOrphanedEvents ($ this ->dispatcher ->getOrphanedEvents ());
@@ -66,67 +66,67 @@ public function lateCollect()
66
66
*
67
67
* @param array $listeners An array of called listeners
68
68
*
69
- * @see TraceableEventDispatcherInterface
69
+ * @see TraceableEventDispatcher
70
70
*/
71
71
public function setCalledListeners (array $ listeners )
72
72
{
73
73
$ this ->data ['called_listeners ' ] = $ listeners ;
74
74
}
75
75
76
76
/**
77
- * Gets the called listeners.
77
+ * Sets the not called listeners.
78
78
*
79
- * @return array An array of called listeners
79
+ * @param array $listeners An array of not called listeners
80
80
*
81
- * @see TraceableEventDispatcherInterface
81
+ * @see TraceableEventDispatcher
82
82
*/
83
- public function getCalledListeners ( )
83
+ public function setNotCalledListeners ( array $ listeners )
84
84
{
85
- return $ this ->data ['called_listeners ' ] ;
85
+ $ this ->data ['not_called_listeners ' ] = $ listeners ;
86
86
}
87
87
88
88
/**
89
- * Sets the not called listeners .
89
+ * Sets the orphaned events .
90
90
*
91
- * @param array $listeners An array of not called listeners
91
+ * @param array $events An array of orphaned events
92
92
*
93
- * @see TraceableEventDispatcherInterface
93
+ * @see TraceableEventDispatcher
94
94
*/
95
- public function setNotCalledListeners (array $ listeners )
95
+ public function setOrphanedEvents (array $ events )
96
96
{
97
- $ this ->data ['not_called_listeners ' ] = $ listeners ;
97
+ $ this ->data ['orphaned_events ' ] = $ events ;
98
98
}
99
99
100
100
/**
101
- * Gets the not called listeners.
101
+ * Gets the called listeners.
102
102
*
103
- * @return array An array of not called listeners
103
+ * @return array An array of called listeners
104
104
*
105
- * @see TraceableEventDispatcherInterface
105
+ * @see TraceableEventDispatcher
106
106
*/
107
- public function getNotCalledListeners ()
107
+ public function getCalledListeners ()
108
108
{
109
- return $ this ->data ['not_called_listeners ' ];
109
+ return $ this ->data ['called_listeners ' ];
110
110
}
111
111
112
112
/**
113
- * Sets the orphaned events .
113
+ * Gets the not called listeners .
114
114
*
115
- * @param array $events An array of orphaned events
115
+ * @return array An array of not called listeners
116
116
*
117
- * @see TraceableEventDispatcherInterface
117
+ * @see TraceableEventDispatcher
118
118
*/
119
- public function setOrphanedEvents ( array $ events )
119
+ public function getNotCalledListeners ( )
120
120
{
121
- $ this ->data ['orphaned_events ' ] = $ events ;
121
+ return $ this ->data ['not_called_listeners ' ] ;
122
122
}
123
123
124
124
/**
125
125
* Gets the orphaned events.
126
126
*
127
127
* @return array An array of orphaned events
128
128
*
129
- * @see TraceableEventDispatcherInterface
129
+ * @see TraceableEventDispatcher
130
130
*/
131
131
public function getOrphanedEvents ()
132
132
{
0 commit comments