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

Breadcrumb

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

function UriInterface::getFragment

Retrieve the fragment component of the URI.

If no fragment is present, this method MUST return an empty string.

The leading "#" character is not part of the fragment and MUST NOT be added.

The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.5.

Return value

string The URI fragment.

See also

https://tools.ietf.org/html/rfc3986#section-2

https://tools.ietf.org/html/rfc3986#section-3.5

1 method overrides UriInterface::getFragment()
Uri::getFragment in vendor/guzzlehttp/psr7/src/Uri.php
Retrieve the fragment component of the URI.

File

vendor/psr/http-message/src/UriInterface.php, line 175

Class

UriInterface
Value object representing a URI.

Namespace

Psr\Http\Message

Code

public function getFragment() : string;

API Navigation

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