You are here

private function Uri::filterQueryOrFragment in Zircon Profile 8.0

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

Filter a query string key or value, or a fragment.

Parameters

string $value:

Return value

string

2 calls to Uri::filterQueryOrFragment()
Uri::filterFragment in vendor/zendframework/zend-diactoros/src/Uri.php
Filter a fragment value to ensure it is properly encoded.
Uri::filterQuery in vendor/zendframework/zend-diactoros/src/Uri.php
Filter a query string to ensure it is propertly encoded.

File

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

Class

Uri
Implementation of Psr\Http\UriInterface.

Namespace

Zend\Diactoros

Code

private function filterQueryOrFragment($value) {
  return preg_replace_callback('/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\\/\\?]+|%(?![A-Fa-f0-9]{2}))/', [
    $this,
    'urlEncodeChar',
  ], $value);
}