/** * @param string $body * @param string $headers * @param Request $request * @param array $meta_data */ public function __construct($body, $headers, Request $request, array $meta_data = array()) { $this->request = $request; $this->raw_headers = $headers; $this->raw_body = $body; $this->meta_data = $meta_data; $this->code = $this->_parseCode($headers); $this->reason = Http::reason($this->code); $this->headers = Response\Headers::fromString($headers); $this->_interpretHeaders(); $this->body = $this->_parse($body); }