trait ArrayAccessTrait (View source)

Methods

string
offsetGet($index)

Return the value at index

offsetSet(string $index, mixed $value)

Assigns a value to index offset

offsetUnset(string $index)

Unsets an index

boolean
offsetExists(string $index)

Check if an index exists

Details

string offsetGet($index)

Return the value at index

Parameters

$index

Return Value

string $index The offset

offsetSet(string $index, mixed $value)

Assigns a value to index offset

Parameters

string $index The offset to assign the value to
mixed $value The value to set

offsetUnset(string $index)

Unsets an index

Parameters

string $index The offset to unset

boolean offsetExists(string $index)

Check if an index exists

Parameters

string $index Offset

Return Value

boolean