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)
- Full name:
\GraphQL\Utils\MixedStore
- This class implements:
\ArrayAccess
private \GraphQL\Type\Definition\EnumValueDefinition[] $standardStore
private array $floatStore
private \SplObjectStorage $objectStore
private callable[] $arrayKeys
private \GraphQL\Type\Definition\EnumValueDefinition[] $arrayValues
private callable[] $lastArrayKey
private mixed $lastArrayValue
private mixed $nullValue
private bool $nullValueIsSet
private mixed $trueValue
private bool $trueValueIsSet
private mixed $falseValue
private bool $falseValueIsSet
public __construct(): mixed
Whether a offset exists
public offsetExists(mixed $offset): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$offset |
mixed | <p> An offset to check for. </p> |
Return Value:
true on success or false on failure.
The return value will be casted to boolean if non-boolean was returned.
See Also:
Offset to retrieve
public offsetGet(mixed $offset): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$offset |
mixed | <p> The offset to retrieve. </p> |
Return Value:
Can return all value types.
See Also:
Offset to set
public offsetSet(mixed $offset, mixed $value): void
Parameters:
Parameter | Type | Description |
---|---|---|
$offset |
mixed | <p> The offset to assign the value to. </p> |
$value |
mixed | <p> The value to set. </p> |
See Also:
Offset to unset
public offsetUnset(mixed $offset): void
Parameters:
Parameter | Type | Description |
---|---|---|
$offset |
mixed | <p> The offset to unset. </p> |
See Also: