16 require_once
'Constants.inc.php';
25 protected $transportResponse = null;
38 return $this->transportResponse;
49 $this->transportResponse = $transportResponse;
60 $this->error = $errorCode;
78 return $this->transportResponse->getResponseItemField ( $messageItem,
'body' );
87 return $this->transportResponse->getResponseItemField ( $messageItem,
'id' );
96 return $this->transportResponse->getResponseItemField ( $messageItem,
'error' );
107 NODE_MANAGE_RESPONSE_FIELD_STATUS => ERROR_OK
110 if ($this->transportResponse->getResponseItemField ( $messageItem,
'error' )) {
111 $ret [NODE_MANAGE_RESPONSE_FIELD_STATUS] = ERROR_ERROR;
114 $body = $this->transportResponse->getResponseItemField ( $messageItem,
'body' );
116 $parts = explode ( CMD_RESPONSE_DELIMITER, $body );
117 if ($parts [0] !== ERROR_OK) {
118 $ret [NODE_MANAGE_RESPONSE_FIELD_STATUS] = ERROR_ERROR;
120 $ret [NODE_MANAGE_RESPONSE_FIELD_STATUS] = ERROR_OK;
121 for($i = 1; $i < count ( $parts ); $i ++) {
122 $part = explode ( CMD_RESPONSE_ITEMS_DELIMITER, $parts [$i] );
123 $ret [$part [0]] = $part [1];
136 if ($transportResponse === null) {
137 $this->transportResponse = new \HCE\transport\Response ();
145 $this->transportResponse = NULL;