16 require_once
'Constants.inc.php';
17 require_once
'Node.inc.php';
18 require_once
'NodeCommand.inc.php';
19 require_once
'NodeManageRequest.inc.php';
20 require_once
'NodeManageResponse.inc.php';
29 protected $nodes = array ();
34 protected $responses = array ();
49 $this->nodes = $nodes;
69 $this->error = $errorCode;
87 if ($responseItem !== NULL) {
88 $this->responses [] = $responseItem;
99 if (isset ( $this->responses [$index] )) {
100 unset ( $this->responses [$index] );
111 $this->responses = $responses;
122 if ($index === NULL) {
123 return count ( $this->responses );
125 return $this->responses [$index];
133 return $this->responses;
145 if ($nodes !== null) {
146 $this->setNodes ( $nodes );
155 $this->responses = null;
173 foreach ( $this->nodes as
$node ) {
175 $response = $request->execute ( $commandObject, $node );
177 $this->addResponseItem ( $response );
178 if ($response->getErrorCode ()) {
195 foreach ( $this->responses as $response ) {
196 if ($response->getErrorCode ()) {
197 $ret .= MSG_NODE_MANAGE_RESPONSE_ITEM_ERROR . $response->getErrorCode () . PHP_EOL;
199 $transportResponse = $response->getResponse ();
200 if ($transportResponse->getErrorCode ()) {
201 $ret .= MSG_TRANSPORT_RESPONSE_ITEM_ERROR . $transportResponse->getErrorCode () . PHP_EOL;
204 $transportResponsesItems = $transportResponse->getResponses ();
206 foreach ( $transportResponsesItems as $transportResponseItem ) {
207 $ret .= var_export ( $transportResponseItem,
true );
225 foreach ( $this->responses as $response ) {
227 $response->getResponseMessageErrorCode (),
228 $response->getResponseMessageId (),
229 $response->getResponseMessageBody ()
246 foreach ( $this->responses as $response ) {
247 $ret [] = $response->getResponseCommandFields ();