interface IContainer implements IComponent

Containers are objects that logically contain zero or more IComponent components.

Methods

addComponent(IComponent $component, string|null $name)

Adds the component to the container.

void
removeComponent(IComponent $component)

Removes the component from the container.

IComponent|null
getComponent(string $name)

Returns component specified by name or path.

getComponents()

Iterates over descendants components.

Details

at line 22
IContainer addComponent(IComponent $component, string|null $name)

Adds the component to the container.

Parameters

IComponent $component
string|null $name

Return Value

IContainer

at line 27
void removeComponent(IComponent $component)

Removes the component from the container.

Parameters

IComponent $component

Return Value

void

at line 33
IComponent|null getComponent(string $name)

Returns component specified by name or path.

Parameters

string $name

Return Value

IComponent|null

Exceptions

InvalidArgumentException if component doesn't exist

at line 38
Iterator getComponents()

Iterates over descendants components.

Return Value

Iterator