). * @param string $body (Required) XML-formatted response from OSS. * @param integer $status (Optional) HTTP response status code from the request. * @return Mixed Contains an `header` property (HTTP headers as an associative array), a or `body` property, and an `status` code. */ public function __construct($header, $body, $status = null) { $this->header = $header; $this->body = $body; $this->status = $status; return $this; } /** * Did we receive the status code we expected? * * @param integer|array $codes (Optional) The status code(s) to expect. Pass an for a single acceptable value, or an of integers for multiple acceptable values. * @return boolean Whether we received the expected status code or not. */ public function isOK($codes = array(200, 201, 204, 206)) { if (is_array($codes)) { return in_array($this->status, $codes); } return $this->status === $codes; } }