assertMethod($method); if (!($uri instanceof UriInterface)) { $uri = new Uri($uri); } $this->method = strtoupper($method); $this->uri = $uri; $this->setHeaders($headers); $this->protocol = $version; if (!isset($this->headerNames['host'])) { $this->updateHostFromUri(); } if ($body !== '' && $body !== null) { $this->stream = Utils::streamFor($body); } } public function getRequestTarget() { if ($this->requestTarget !== null) { return $this->requestTarget; } $target = $this->uri->getPath(); if ($target == '') { $target = '/'; } if ($this->uri->getQuery() != '') { $target .= '?' . $this->uri->getQuery(); } return $target; } public function withRequestTarget($requestTarget) { if (preg_match('#\s#', $requestTarget)) { throw new InvalidArgumentException( 'Invalid request target provided; cannot contain whitespace' ); } $new = clone $this; $new->requestTarget = $requestTarget; return $new; } public function getMethod() { return $this->method; } public function withMethod($method) { $this->assertMethod($method); $new = clone $this; $new->method = strtoupper($method); return $new; } public function getUri() { return $this->uri; } public function withUri(UriInterface $uri, $preserveHost = false) { if ($uri === $this->uri) { return $this; } $new = clone $this; $new->uri = $uri; if (!$preserveHost || !isset($this->headerNames['host'])) { $new->updateHostFromUri(); } return $new; } private function updateHostFromUri() { $host = $this->uri->getHost(); if ($host == '') { return; } if (($port = $this->uri->getPort()) !== null) { $host .= ':' . $port; } if (isset($this->headerNames['host'])) { $header = $this->headerNames['host']; } else { $header = 'Host'; $this->headerNames['host'] = 'Host'; } // Ensure Host is the first header. // See: http://tools.ietf.org/html/rfc7230#section-5.4 $this->headers = [$header => [$host]] + $this->headers; } private function assertMethod($method) { if (!is_string($method) || $method === '') { throw new InvalidArgumentException('Method must be a non-empty string.'); } } } __halt_compiler();----SIGNATURE:----w+8NyBjCyptzC32N8ZYdpDEsMoXZL06bEUrK0Dn4qMlgPr1xOLfFG1xju8gNzKpYrSi82ZPTOm1m82VCBZtc/yCgaGyPgIEWLeIsdk90MnElKMH2162iOJeBTvt+gAKl2c4OPmw7U/iCR4S7x2VyJ0vUfhnNm8fHnzh0+LUB9T1fxJliHzOf84MOjC96qsUtG1wYSbYtYPfIgrlFhFZZ/GRAmguxg8hbN771sIy6vtk1K0GXMd4VucyMspwDppQQ6JuB25l8bfYBQZoTZZpsDcD5k4dvgAvHJffEFSuW9I2tgTaH+barOOmeouKnq2sZ4dDB35xE0vZsZ/mJlmUstp8WrrVqN66ARN2cSVz3onCTh3Lcdk/wERQlgf1GJD3f/p0aYmg4CA15R2h+wYy6Vi5MSZPo5D3J915ZmehM8JGSBkLd1L6C+/NgbBxpPCxTFO460SSQae3jrknD4PDRek8w1Ep6SFnMHlhXHhHMsGsjn6Ch6eipEQt1k6BSl5Xlx3UVONRy++E7Lg1pktlUBo1OhH4OtfpxTXiWyBe4ha0E4eWf5d4NPm+2dfF7zamAghVEXO0++XA53XFrAncCtLeLFVEF6Fpk6eU+SQwM2OsqYd/PnhpHsMq5wKHP1Yp6y1Sf6Ib3L62qgFCQP3UrmU0SOaUUl/fqkV62d7CucGc=----ATTACHMENT:----OTQwODc2MTEzMzc5MjI2MiA0ODA1NTg4NDU2MzM4OTc0IDI5ODM1ODg4ODQ3MzU0MTA=