Documentation

UrlParser
in package
implements UrlParserInterface

Parses URLs into parts using PHP's built-in parse_url() function

Tags
deprecated

Just use parse_url. UTF-8 characters should be percent encoded anyways.

codeCoverageIgnore

Interfaces, Classes and Traits

UrlParserInterface
URL parser interface

Table of Contents

$utf8  : bool
parseUrl()  : array<string|int, mixed>
Parse a URL using special handling for a subset of UTF-8 characters in the query string if needed.
setUtf8Support()  : mixed
Set whether or not to attempt to handle UTF-8 strings (still WIP)

Properties

$utf8

protected bool $utf8 = false

Whether or not to work with UTF-8 strings

Methods

parseUrl()

Parse a URL using special handling for a subset of UTF-8 characters in the query string if needed.

public parseUrl(mixed $url) : array<string|int, mixed>
Parameters
$url : mixed

URL to parse

Return values
array<string|int, mixed>

Returns an array identical to what is returned from parse_url(). When an array key is missing from this array, you must fill it in with NULL to avoid warnings in calling code.

setUtf8Support()

Set whether or not to attempt to handle UTF-8 strings (still WIP)

public setUtf8Support(bool $utf8) : mixed
Parameters
$utf8 : bool

Set to TRUE to handle UTF string

Return values
mixed

Search results