Skip to content

Latest commit

 

History

History
367 lines (137 loc) · 3.08 KB

MixedStore.md

File metadata and controls

367 lines (137 loc) · 3.08 KB

MixedStore

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

Properties

standardStore

private \GraphQL\Type\Definition\EnumValueDefinition[] $standardStore

floatStore

private array $floatStore

objectStore

private \SplObjectStorage $objectStore

arrayKeys

private callable[] $arrayKeys

arrayValues

private \GraphQL\Type\Definition\EnumValueDefinition[] $arrayValues

lastArrayKey

private callable[] $lastArrayKey

lastArrayValue

private mixed $lastArrayValue

nullValue

private mixed $nullValue

nullValueIsSet

private bool $nullValueIsSet

trueValue

private mixed $trueValue

trueValueIsSet

private bool $trueValueIsSet

falseValue

private mixed $falseValue

falseValueIsSet

private bool $falseValueIsSet

Methods

__construct

public __construct(): mixed

offsetExists

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:


offsetGet

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:


offsetSet

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:


offsetUnset

Offset to unset

public offsetUnset(mixed $offset): void

Parameters:

Parameter Type Description
$offset mixed <p>
The offset to unset.
</p>

See Also: