コード例 #1
0
 /**
  * Builds the request uri.
  *
  * @param ParameterCollection $server
  * @param HeaderCollection    $headers
  *
  * @return UriInterface
  */
 private function buildUri(ParameterCollection $server, HeaderCollection $headers) : UriInterface
 {
     $query = ltrim($server->get('QUERY_STRING', ''), '?');
     if ($query != '') {
         $query = '?' . $query;
     }
     $scheme = $this->getScheme($server, $headers);
     $host = $this->getHost($server, $headers);
     $port = $this->getPort($server, $headers);
     $path = $this->getPath($server, $headers);
     return $this->uriFactory->build($scheme . '://' . $host . ':' . $port . $path . $query);
 }
コード例 #2
0
 public function getAttribute($name, $default = null)
 {
     return $this->attributes->get($name, $default);
 }