Documentation

Converter
in package

FinalYes

Table of Contents

Constants

REGEXP_INVALID_CHARS  = '/[\x00-\x1f\x7f]/'

Properties

$fromRfc3986  : array<string|int, mixed>
$separator  : string
$toEncoding  : array<string|int, mixed>

Methods

encodingMap()  : array<string, string>
fromEncodingType()  : self
fromFormData()  : self
fromRFC1738()  : self
fromRFC3986()  : self
new()  : self
separator()  : non-empty-string
toPairs()  : array<string|int, array<int, string|null>>
toValue()  : string|null
withEncodingMap()  : self
Sets the conversion map.
withSeparator()  : self
__construct()  : mixed
vString()  : string|null

Constants

REGEXP_INVALID_CHARS

private mixed REGEXP_INVALID_CHARS = '/[\x00-\x1f\x7f]/'

Properties

$fromRfc3986 read-only

private array<string|int, mixed> $fromRfc3986 = []

$separator read-only

private string $separator

$toEncoding read-only

private array<string|int, mixed> $toEncoding = []

Methods

encodingMap()

public encodingMap() : array<string, string>
Return values
array<string, string>

fromEncodingType()

public static fromEncodingType(int $encType) : self
Parameters
$encType : int
Return values
self

fromRFC1738()

public static fromRFC1738([non-empty-string $separator = '&' ]) : self
Parameters
$separator : non-empty-string = '&'
Return values
self

fromRFC3986()

public static fromRFC3986([non-empty-string $separator = '&' ]) : self
Parameters
$separator : non-empty-string = '&'
Return values
self

new()

public static new(non-empty-string $separator) : self
Parameters
$separator : non-empty-string
Return values
self

separator()

public separator() : non-empty-string
Return values
non-empty-string

toPairs()

public toPairs(Stringable|string|int|float|bool|null $value) : array<string|int, array<int, string|null>>
Parameters
$value : Stringable|string|int|float|bool|null
Return values
array<string|int, array<int, string|null>>

toValue()

public toValue(iterable<string|int, Stringable|string|bool|int|float|null}$pairs) : string|null
Parameters
$pairs : iterable<string|int, Stringable|string|bool|int|float|null}>
Return values
string|null

withEncodingMap()

Sets the conversion map.

public withEncodingMap(iterable<string|int, mixed> $encodingMap) : self

Each key from the iterable structure represents the RFC3986 encoded characters as string, while each value represents the expected output encoded characters

Parameters
$encodingMap : iterable<string|int, mixed>
Return values
self

withSeparator()

public withSeparator(non-empty-string $separator) : self
Parameters
$separator : non-empty-string
Return values
self

__construct()

private __construct(non-empty-string $separator[, array<string|int, string> $fromRfc3986 = [] ][, array<string|int, string> $toEncoding = [] ]) : mixed
Parameters
$separator : non-empty-string

the query string separator

$fromRfc3986 : array<string|int, string> = []

contains all the RFC3986 encoded characters to be converted

$toEncoding : array<string|int, string> = []

contains all the expected encoded characters

vString()

private static vString(Stringable|string|bool|int|float|null $value) : string|null
Parameters
$value : Stringable|string|bool|int|float|null
Return values
string|null

        
On this page

Search results