예제 #1
0
 /**
  * @param Object HTTP_Response object
  * @return bool
  */
 protected function _isOk(HTTP_Response $response)
 {
     if ($response->failed()) {
         return false;
     } else {
         if (preg_match('@<Error>.*?<Code>(.*?)</Code>.*?<Message>(.*?)</Message>.*?</Error>@s', $response->getBody(), $matches)) {
             $this->_error_code = $matches[1];
             $this->_error_message = $matches[2];
             return false;
         } else {
             return true;
         }
     }
 }