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

Breadcrumb

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

function Uri::fromParts

Creates a URI from a hash of `parse_url` components.

Throws

MalformedUriException If the components do not form a valid URI.

See also

https://www.php.net/manual/en/function.parse-url.php

1 call to Uri::fromParts()
UrlEncode::transform in core/modules/migrate/src/Plugin/migrate/process/UrlEncode.php
Performs the associated process.

File

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

Class

Uri
PSR-7 URI implementation.

Namespace

GuzzleHttp\Psr7

Code

public static function fromParts(array $parts) : UriInterface {
    $uri = new self();
    $uri->applyParts($parts);
    $uri->validateState();
    return $uri;
}

API Navigation

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