public static function Url::factory

Factory method to create a new URL from a URL string

Parameters

string $url Full URL used to create a Url object:

Return value

Url

4 calls to Url::factory()
CurlHandle::getUrl in drupal/core/vendor/guzzle/http/Guzzle/Http/Curl/CurlHandle.php
Get the URL that this handle is connecting to
RedirectPlugin::createRedirectRequest in drupal/core/vendor/guzzle/http/Guzzle/Http/RedirectPlugin.php
Create a redirect request for a specific request object
Request::setUrl in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Request.php
Set the URL of the request
Url::combine in drupal/core/vendor/guzzle/http/Guzzle/Http/Url.php
Combine the URL with another URL. Parts specified in the passed URL will supersede parts in the current URL.

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Url.php, line 33

Class

Url
Parses and generates URLs based on URL parts. In favor of performance, URL parts are not validated.

Namespace

Guzzle\Http

Code

public static function factory($url) {
  $parts = ParserRegistry::getInstance()
    ->getParser('url')
    ->parseUrl($url);

  // Convert the query string into a QueryString object
  if ($parts['query']) {
    $parts['query'] = QueryString::fromString($parts['query']);
  }
  return new self($parts['scheme'], $parts['host'], $parts['user'], $parts['pass'], $parts['port'], $parts['path'], $parts['query'], $parts['fragment']);
}