WooCommerce Code Reference

MixedStore
in package
implements ArrayAccess

Similar to PHP array, but allows any type of data to act as key (including arrays, objects, scalars).

When storing array as key, access and modification is O(N). Avoid if possible.

Tags
template

TValue of mixed

implements

\ArrayAccess<mixed, TValue>

see
MixedStoreTest

Interfaces, Classes and Traits

ArrayAccess

Table of Contents

$arrayKeys  : array<string|int, mixed>
$arrayValues  : array<string|int, mixed>
$falseValue  : TValue|null
$falseValueIsSet  : bool
$floatStore  : array<string|int, mixed>
$lastArrayKey  : array<string|int, mixed>|null
$lastArrayValue  : TValue|null
$nullValue  : TValue|null
$nullValueIsSet  : bool
$objectStore  : SplObjectStorage
$standardStore  : array<string|int, mixed>
$trueValue  : TValue|null
$trueValueIsSet  : bool
__construct()  : mixed
offsetExists()  : bool
offsetGet()  : TValue|null
offsetSet()  : void
offsetUnset()  : void

Properties

Methods

offsetSet()

public offsetSet(mixed $offset, TValue $value) : void
Parameters
$offset : mixed
$value : TValue
Tags
throws
InvalidArgumentException
Return values
void