trait ArrayAccess

Implementation of \ArrayAccess for IContainer.

Methods

void
offsetSet(string|int $name, T $component)

Adds the component to the container.

offsetGet(string|int $name)

Returns component specified by name. Throws exception if component doesn't exist.

bool
offsetExists(string|int $name)

Does component specified by name exists?

void
offsetUnset(string|int $name)

Removes component from the container.

Details

at line 26
void offsetSet(string|int $name, T $component)

Adds the component to the container.

Parameters

string|int $name
T $component

Return Value

void

at line 39
IComponent offsetGet(string|int $name)

Returns component specified by name. Throws exception if component doesn't exist.

Parameters

string|int $name

Return Value

IComponent

Exceptions

InvalidArgumentException

at line 50
bool offsetExists(string|int $name)

Does component specified by name exists?

Parameters

string|int $name

Return Value

bool

at line 61
void offsetUnset(string|int $name)

Removes component from the container.

Parameters

string|int $name

Return Value

void