Documentation

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
throws
InvalidArgumentException

If the host is invalid.

Return values
string

filterPath()

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
throws
InvalidArgumentException

If the path is invalid.

link
http://www.faqs.org/rfcs/rfc3986.html
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
throws
InvalidArgumentException

If the port is invalid.

Return values
int|null

filterQueryOrFragment()

Filters the query string or fragment of a URI.

public static filterQueryOrFragment(string $query) : string
Parameters
$query : string

The raw uri query string.

Tags
throws
InvalidArgumentException

If the query is invalid.

Return values
string

The percent-encoded query string.

filterScheme()

public static filterScheme(string $scheme) : string
Parameters
$scheme : string
Tags
throws
InvalidArgumentException

If the scheme is invalid.

Return values
string

filterUserInfo()

Filters the user info string.

public static filterUserInfo(string $info) : string
Parameters
$info : string

The raw user or password.

Tags
throws
InvalidArgumentException
Return values
string

The percent-encoded user or password string.


        
On this page

Search results