UriPattern
class UriPattern (View source)
Provides PCRE based matching for URIs.
Methods
Creates a new instance of UriPattern.
Allows or forbids non ascii characters in some parts of the URI.
Matches the string against URI or relative-ref ABNF.
Matches the string against the URI ABNF.
Matches the string against the relative-ref ABNF.
Matches the string against the scheme ABNF.
Matches the string against the host ABNF.
Details
at line 31
__construct()
Creates a new instance of UriPattern.
at line 50
allowNonAscii(bool $enabled = true)
Allows or forbids non ascii characters in some parts of the URI.
When enabled, non ascii characters are allowed in userinfo
, reg_name
,
path
, query
and fragment
parts of the URI. Note that pattern does
not verify whether the bytes actually form valid UTF-8 sequences or not.
Enabling this option simply allows bytes within the range of x80-xFF
.
at line 61
bool
matchUri(string $uri, array $matches = [])
Matches the string against URI or relative-ref ABNF.
at line 76
bool
matchAbsoluteUri(string $uri, array $matches = [])
Matches the string against the URI ABNF.
at line 87
bool
matchRelativeUri(string $uri, array $matches = [])
Matches the string against the relative-ref ABNF.
at line 98
bool
matchScheme(string $scheme, array $matches = [])
Matches the string against the scheme ABNF.
at line 109
bool
matchHost(string $host, array $matches = [])
Matches the string against the host ABNF.