php-dextrin

MapKey
in package

FinalYes

Which values may be map keys (DXN.md ยง1.6): a string, keyword, integer, uuid, objectid, date, bytes, symbol or char. Anything else is refused as `key/not-allowed` -- in text, in binary and when encoding.

The allowed types are those whose identity is exact and obvious in every language. Floats, decimals and rationals are not; neither are times, URIs or collections; null and the booleans collide with other keys as PHP array keys (null with "", true with 1) and are rare as keys anyway.

Table of Contents

Methods

allowed()  : bool
check()  : void
checkPairs()  : void
__construct()  : mixed

Methods

allowed()

public static allowed(mixed $key) : bool
Parameters
$key : mixed
Return values
bool

check()

public static check(mixed $key) : void
Parameters
$key : mixed
Tags
throws
KeyNotAllowed

checkPairs()

public static checkPairs(iterable<string|int, array{0: mixed, 1: mixed}> $pairs) : void
Parameters
$pairs : iterable<string|int, array{0: mixed, 1: mixed}>
Tags
throws
KeyNotAllowed

__construct()

private __construct() : mixed
On this page

Search results