You are here

public function UriInterface::withFragment in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/psr/http-message/src/UriInterface.php \Psr\Http\Message\UriInterface::withFragment()

Return an instance with the specified URI fragment.

This method MUST retain the state of the current instance, and return an instance that contains the specified URI fragment.

Users can provide both encoded and decoded fragment characters. Implementations ensure the correct encoding as outlined in getFragment().

An empty fragment value is equivalent to removing the fragment.

Parameters

string $fragment The fragment to use with the new instance.:

Return value

self A new instance with the specified fragment.

2 methods override UriInterface::withFragment()
Uri::withFragment in vendor/zendframework/zend-diactoros/src/Uri.php
Return an instance with the specified URI fragment.
Uri::withFragment in vendor/guzzlehttp/psr7/src/Uri.php
Return an instance with the specified URI fragment.

File

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

Class

UriInterface
Value object representing a URI.

Namespace

Psr\Http\Message

Code

public function withFragment($fragment);