version = $version; return $this; } /** * Return the HTTP version for this request * * @return string */ public function getVersion() { return $this->version; } /** * Provide an alternate Parameter Container implementation for headers in this object, * (this is NOT the primary API for value setting, for that see getHeaders()) * * @see getHeaders() * * @return $this */ public function setHeaders(Headers $headers) { $this->headers = $headers; return $this; } /** * Return the header container responsible for headers * * @return Headers */ public function getHeaders() { if ($this->headers === null || is_string($this->headers)) { // this is only here for fromString lazy loading $this->headers = is_string($this->headers) ? Headers::fromString($this->headers) : new Headers(); } return $this->headers; } /** * Allow PHP casting of this object * * @return string */ public function __toString() { return $this->toString(); } }