Util
abstract class Util
Static utility methods
Methods
static array
decodePointer(string $pointer)
Decode a JSON pointer to a path array
static string
encodePointer(array $path)
Encode a path array as a JSON pointer
static bool
compare(mixed $valueOne, mixed $valueTwo)
Compare two values for equality
static int
typeMask(mixed $value, bool $onlyOne = false)
Get the type mask for a given value
static mixed
cast(int $asType, mixed $value)
Cast a value to conform to the given type mask, losing as little fidelity as possible
Details
at line 26
static array
decodePointer(string $pointer)
Decode a JSON pointer to a path array
at line 47
static string
encodePointer(array $path)
Encode a path array as a JSON pointer
at line 64
static bool
compare(mixed $valueOne, mixed $valueTwo)
Compare two values for equality
at line 145
static int
typeMask(mixed $value, bool $onlyOne = false)
Get the type mask for a given value
at line 191
static mixed
cast(int $asType, mixed $value)
Cast a value to conform to the given type mask, losing as little fidelity as possible