Class that handles operations involving percent-encoding in URIs.
Methods | ||||
---|---|---|---|---|
public
|
__construct(bool $preserve = false)
String of characters that should be preserved while using encode().
String of characters that should be preserved while using encode(). |
# | ||
public
|
encode(string $string): string
Our replacement for urlencode, it encodes all non-reserved characters,
as well as any extra characters that were…
Our replacement for urlencode, it encodes all non-reserved characters, as well as any extra characters that were instructed to be preserved. Parameters
ReturnsEncoded string. |
# | ||
public
|
normalize(string $string): string
Fix up percent-encoding by decoding unreserved characters and normalizing.
Fix up percent-encoding by decoding unreserved characters and normalizing. Parameters
|
# |
Properties | |||
---|---|---|---|
protected
|
|
$preserve = []
Reserved characters to preserve when using encode().
Reserved characters to preserve when using encode(). |
# |