Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/protocol/ConduitAPIResponse.php
| <?php | <?php | ||||
| /** | |||||
| * @group conduit | |||||
| */ | |||||
| final class ConduitAPIResponse { | final class ConduitAPIResponse { | ||||
| private $result; | private $result; | ||||
| private $errorCode; | private $errorCode; | ||||
| private $errorInfo; | private $errorInfo; | ||||
| public function setResult($result) { | public function setResult($result) { | ||||
| $this->result = $result; | $this->result = $result; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getResult() { | public function getResult() { | ||||
| return $this->result; | return $this->result; | ||||
| } | } | ||||
| public function setErrorCode($error_code) { | public function setErrorCode($error_code) { | ||||
| $this->errorCode = $error_code; | $this->errorCode = $error_code; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getErrorCode() { | public function getErrorCode() { | ||||
| return $this->errorCode; | return $this->errorCode; | ||||
| } | } | ||||
| public function setErrorInfo($error_info) { | public function setErrorInfo($error_info) { | ||||
| $this->errorInfo = $error_info; | $this->errorInfo = $error_info; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getErrorInfo() { | public function getErrorInfo() { | ||||
| return $this->errorInfo; | return $this->errorInfo; | ||||
| } | } | ||||
| public function toDictionary() { | public function toDictionary() { | ||||
| return array( | return array( | ||||
| 'result' => $this->getResult(), | 'result' => $this->getResult(), | ||||
| 'error_code' => $this->getErrorCode(), | 'error_code' => $this->getErrorCode(), | ||||
| 'error_info' => $this->getErrorInfo(), | 'error_info' => $this->getErrorInfo(), | ||||
| ); | ); | ||||
| } | } | ||||
| } | } | ||||