MixedStore
in package
implements
ArrayAccess
Similar to PHP array, but allows any type of data to act as key (including arrays, objects, scalars)
Note: unfortunately when storing array as key - access and modification is O(N) (yet this should rarely be the case and should be avoided when possible)
Interfaces, Classes, Traits and Enums
- ArrayAccess
Table of Contents
- $arrayKeys : array<string|int, callable>
- $arrayValues : array<string|int, EnumValueDefinition>
- $falseValue : mixed
- $falseValueIsSet : bool
- $floatStore : array<string|int, mixed>
- $lastArrayKey : array<string|int, callable>
- $lastArrayValue : mixed
- $nullValue : mixed
- $nullValueIsSet : bool
- $objectStore : SplObjectStorage
- $standardStore : array<string|int, EnumValueDefinition>
- $trueValue : mixed
- $trueValueIsSet : bool
- __construct() : mixed
- offsetExists() : bool
- Whether a offset exists
- offsetGet() : mixed
- Offset to retrieve
- offsetSet() : void
- Offset to set
- offsetUnset() : void
- Offset to unset
Properties
$arrayKeys
private
array<string|int, callable>
$arrayKeys
$arrayValues
private
array<string|int, EnumValueDefinition>
$arrayValues
$falseValue
private
mixed
$falseValue
$falseValueIsSet
private
bool
$falseValueIsSet
$floatStore
private
array<string|int, mixed>
$floatStore
$lastArrayKey
private
array<string|int, callable>
$lastArrayKey
$lastArrayValue
private
mixed
$lastArrayValue
$nullValue
private
mixed
$nullValue
$nullValueIsSet
private
bool
$nullValueIsSet
$objectStore
private
SplObjectStorage
$objectStore
$standardStore
private
array<string|int, EnumValueDefinition>
$standardStore
$trueValue
private
mixed
$trueValue
$trueValueIsSet
private
bool
$trueValueIsSet
Methods
__construct()
public
__construct() : mixed
Return values
mixed —offsetExists()
Whether a offset exists
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
-
An offset to check for.
Tags
Return values
bool —true on success or false on failure.
The return value will be casted to boolean if non-boolean was returned.
offsetGet()
Offset to retrieve
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
-
The offset to retrieve.
Tags
Return values
mixed —Can return all value types.
offsetSet()
Offset to set
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
-
The offset to assign the value to.
- $value : mixed
-
The value to set.
Tags
Return values
void —offsetUnset()
Offset to unset
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
-
The offset to unset.