hasError()) { #require_once 'Zend/Service/DeveloperGarden/Response/Exception.php'; throw new Zend_Service_DeveloperGarden_Response_Exception( $this->getErrorMessage(), $this->getErrorCode() ); } return $this; } /** * returns the error code * * @return string|null */ public function getErrorCode() { $retValue = null; if ($this->return instanceof stdClass) { $retValue = $this->return->status; } return $retValue; } /** * returns the error message * * @return string */ public function getErrorMessage() { $retValue = null; if ($this->return instanceof stdClass) { $retValue = $this->return->description; } return $retValue; } /** * returns true if the errorCode is not null and not 0000 * * @return boolean */ public function isValid() { return ($this->return === null || $this->return->status == '0000'); } /** * returns true if we have a error situation * * @return boolean */ public function hasError() { $retValue = false; if ($this->return instanceof stdClass && $this->return->status != '0000' ) { $retValue = true; } return $retValue; } }