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 23
IContainer addComponent(IComponent $component, string|null $name)

Adds the component to the container.

Parameters

IComponent $component
string|null $name

Return Value

IContainer

at line 28
void removeComponent(IComponent $component)

Removes the component from the container.

Parameters

IComponent $component

Return Value

void

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

Returns component specified by name or path.

Parameters

string $name

Return Value

IComponent|null

Exceptions

InvalidArgumentException

at line 40
Iterator getComponents()

Iterates over descendants components.

Return Value

Iterator