You are here

private function Uri::filterFragment in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-diactoros/src/Uri.php \Zend\Diactoros\Uri::filterFragment()

Filter a fragment value to ensure it is properly encoded.

Parameters

null|string $fragment:

Return value

string

2 calls to Uri::filterFragment()
Uri::parseUri in vendor/zendframework/zend-diactoros/src/Uri.php
Parse a URI into its parts, and set the properties
Uri::withFragment in vendor/zendframework/zend-diactoros/src/Uri.php
Return an instance with the specified URI fragment.

File

vendor/zendframework/zend-diactoros/src/Uri.php, line 625

Class

Uri
Implementation of Psr\Http\UriInterface.

Namespace

Zend\Diactoros

Code

private function filterFragment($fragment) {
  if (!empty($fragment) && strpos($fragment, '#') === 0) {
    $fragment = substr($fragment, 1);
  }
  return $this
    ->filterQueryOrFragment($fragment);
}