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

Breadcrumb

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

function Uri::getAuthority

Overrides UriInterface::getAuthority

2 calls to Uri::getAuthority()
Uri::validateState in vendor/guzzlehttp/psr7/src/Uri.php
Uri::__toString in vendor/guzzlehttp/psr7/src/Uri.php
Return the string representation as a URI reference.

File

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

Class

Uri
PSR-7 URI implementation.

Namespace

GuzzleHttp\Psr7

Code

public function getAuthority() : string {
    $authority = $this->host;
    if ($this->userInfo !== '') {
        $authority = $this->userInfo . '@' . $authority;
    }
    if ($this->port !== null) {
        $authority .= ':' . $this->port;
    }
    return $authority;
}

API Navigation

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