3
3
namespace Http \HttplugBundle \Collector ;
4
4
5
5
/**
6
- * An object to handle the collected data for a client. This is used to display data.
6
+ * An object that managed collected data for each client. This is used to display data.
7
7
*
8
8
* The Request object at $requests[0][2] is the state of the object between the third
9
9
* and the fourth plugin. The response after that plugin is found in $responses[0][2].
10
10
*
11
11
* @author Tobias Nyholm <[email protected] >
12
12
*/
13
- class ClientDataProvider
13
+ class RequestStackProvider
14
14
{
15
15
/**
16
16
* Array that tell if a request errored or not. true = success, false = failure.
@@ -54,7 +54,7 @@ public function __construct(array $failure, array $requests, array $responses)
54
54
*
55
55
* @param array $data
56
56
*
57
- * @return ClientDataProvider []
57
+ * @return RequestStackProvider []
58
58
*/
59
59
public static function createFromCollectedData (array $ data )
60
60
{
@@ -70,7 +70,7 @@ public static function createFromCollectedData(array $data)
70
70
* @param array $messages is an array with keys 'failure', 'request' and 'response' which hold requests for each call to
71
71
* sendRequest and for each depth.
72
72
*
73
- * @return ClientDataProvider
73
+ * @return RequestStackProvider
74
74
*/
75
75
private static function createOne ($ messages )
76
76
{
@@ -99,46 +99,6 @@ private static function createOne($messages)
99
99
return new self ($ orderedFaulure , $ orderedRequests , $ orderedResponses );
100
100
}
101
101
102
- /**
103
- * @return array
104
- */
105
- public function getRequests ()
106
- {
107
- return $ this ->requests ;
108
- }
109
-
110
- /**
111
- * @param array $requests
112
- *
113
- * @return ClientDataProvider
114
- */
115
- public function setRequests ($ requests )
116
- {
117
- $ this ->requests = $ requests ;
118
-
119
- return $ this ;
120
- }
121
-
122
- /**
123
- * @return array
124
- */
125
- public function getResponses ()
126
- {
127
- return $ this ->responses ;
128
- }
129
-
130
- /**
131
- * @param array $responses
132
- *
133
- * @return ClientDataProvider
134
- */
135
- public function setResponses ($ responses )
136
- {
137
- $ this ->responses = $ responses ;
138
-
139
- return $ this ;
140
- }
141
-
142
102
/**
143
103
* Get the index keys for the request and response stacks.
144
104
*
0 commit comments