diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Service/DeveloperGarden/Response/ResponseAbstract.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Service/DeveloperGarden/Response/ResponseAbstract.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,111 @@ +hasError()) { + throw new Zend_Service_DeveloperGarden_Response_Exception( + $this->getErrorMessage(), + $this->getErrorCode() + ); + } + + return $this; + } + + /** + * returns the error code + * + * @return string|null + */ + public function getErrorCode() + { + return $this->errorCode; + } + + /** + * returns the error message + * + * @return string + */ + public function getErrorMessage() + { + return $this->errorMessage; + } + + /** + * returns true if the errorCode is not null and not 0000 + * + * @return boolean + */ + public function isValid() + { + return ($this->errorCode === null + || $this->errorCode == '0000'); + } + + /** + * returns true if we have a error situation + * + * @return boolean + */ + public function hasError() + { + return ($this->errorCode !== null + && $this->errorCode != '0000'); + } +}