Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Uri.php

function Uri::applyParts

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 543

Class

Uri
PSR-7 URI implementation.

Namespace

GuzzleHttp\Psr7

Code

private function applyParts(array $parts) : void {
    $this->scheme = isset($parts['scheme']) ? $this->filterScheme($parts['scheme']) : '';
    $this->userInfo = isset($parts['user']) ? $this->filterUserInfoComponent($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 .= ':' . $this->filterUserInfoComponent($parts['pass']);
    }
    $this->removeDefaultPort();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal