/** * Overload of parent internal method providing signature verification * * @throws AllopassApiWrongFormatResponseException If response doesn't contain valid XML * * @throws AllopassApiRemoteErrorException if response describe a remote API exception */ protected function _verify() { if (!is_object($this->_xml)) { throw new AllopassApiWrongFormatResponseException(); } $attributes = $this->_xml->attributes(); if ((int) $attributes->code != 0) { throw new AllopassApiRemoteErrorException($attributes->code, $attributes->message); } parent::_verify(); }
/** * Constructor * * @param signature (string) Expected response signature * @param headers (string) HTTP headers of the response * @param body (string) Raw data of the response */ public function __construct($signature, $headers, $body) { parent::__construct($signature, $headers, $body); }