private function setPSR7ResponseFromString(string $string, HTTPRequestResponseContainer $httpContainer)
 {
     $body = $this->httpFactory->createStringStream((string) $string);
     $response = $httpContainer->getResponse()->withBody($body);
     $this->setPSR7Response($response, $httpContainer);
 }
 /**
  * Create the URI object from `$server`.
  *
  * @param HTTPServerFactory $httpFactory
  * @param array             $server
  *
  * @return UriInterface
  */
 private function createUri(HTTPServerFactory $httpFactory, array $server) : UriInterface
 {
     $uri = $httpFactory->createUri();
     $uri = $this->withScheme($uri, $server);
     $uri = $this->withHost($uri, $server);
     $uri = $this->withServerPort($uri, $server);
     $uri = $this->withPath($uri, $server);
     $uri = $this->withQueryString($uri, $server);
     return $uri;
 }