UriPartsFilter
in package
Class Uri
Table of Contents
Constants
- HOSTNAME_REGEX = '/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/u'
Methods
- filterHost() : string
- filterPath() : string
- Filter Uri path.
- filterPort() : int|null
- Filter Uri port.
- filterQueryOrFragment() : string
- Filters the query string or fragment of a URI.
- filterScheme() : string
- filterUserInfo() : string
- Filters the user info string.
Constants
HOSTNAME_REGEX
public
mixed
HOSTNAME_REGEX
= '/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/u'
Methods
filterHost()
public
static filterHost(string $host) : string
Parameters
- $host : string
Tags
Return values
stringfilterPath()
Filter Uri path.
public
static filterPath(string $path) : string
This method percent-encodes all reserved characters in the provided path string. This method will NOT double-encode characters that are already percent-encoded.
Parameters
- $path : string
-
The raw uri path.
Tags
Return values
string —The RFC 3986 percent-encoded uri path.
filterPort()
Filter Uri port.
public
static filterPort([int|null $port = null ]) : int|null
This method
Parameters
- $port : int|null = null
Tags
Return values
int|nullfilterQueryOrFragment()
Filters the query string or fragment of a URI.
public
static filterQueryOrFragment(string $query) : string
Parameters
- $query : string
-
The raw uri query string.
Tags
Return values
string —The percent-encoded query string.
filterScheme()
public
static filterScheme(string $scheme) : string
Parameters
- $scheme : string
Tags
Return values
stringfilterUserInfo()
Filters the user info string.
public
static filterUserInfo(string $info) : string
Parameters
- $info : string
-
The raw user or password.
Tags
Return values
string —The percent-encoded user or password string.