trait ArrayAccess

Implementation of \ArrayAccess for IContainer.

Methods

void
offsetSet(string|int $name, IComponent $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 25
void offsetSet(string|int $name, IComponent $component)

Adds the component to the container.

Parameters

string|int $name
IComponent $component

Return Value

void

at line 37
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 48
bool offsetExists(string|int $name)

Does component specified by name exists?

Parameters

string|int $name

Return Value

bool

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

Removes component from the container.

Parameters

string|int $name

Return Value

void