You are here

private function Uri::applyParts in Lockr 7.3

Apply parse_url parts to a URI.

Parameters

array $parts Array of parse_url parts to apply.:

1 call to Uri::applyParts()
Uri::__construct in vendor/guzzlehttp/psr7/src/Uri.php

File

vendor/guzzlehttp/psr7/src/Uri.php, line 535

Class

Uri
PSR-7 URI implementation.

Namespace

GuzzleHttp\Psr7

Code

private function applyParts(array $parts) {
  $this->scheme = isset($parts['scheme']) ? $this
    ->filterScheme($parts['scheme']) : '';
  $this->userInfo = isset($parts['user']) ? $parts['user'] : '';
  $this->host = isset($parts['host']) ? $this
    ->filterHost($parts['host']) : '';
  $this->port = isset($parts['port']) ? $this
    ->filterPort($parts['port']) : null;
  $this->path = isset($parts['path']) ? $this
    ->filterPath($parts['path']) : '';
  $this->query = isset($parts['query']) ? $this
    ->filterQueryAndFragment($parts['query']) : '';
  $this->fragment = isset($parts['fragment']) ? $this
    ->filterQueryAndFragment($parts['fragment']) : '';
  if (isset($parts['pass'])) {
    $this->userInfo .= ':' . $parts['pass'];
  }
  $this
    ->removeDefaultPort();
}