interface IContainer implements IComponent

Defines functionality for objects that can contain other 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.

iterable
getComponents()

Returns immediate child components.

Details

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

Adds the component to the container.

Parameters

IComponent $component
string|null $name

Return Value

IContainer

at line 31
void removeComponent(IComponent $component)

Removes the component from the container.

Parameters

IComponent $component

Return Value

void

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

Returns component specified by name or path.

Parameters

string $name

Return Value

IComponent|null

Exceptions

InvalidArgumentException

at line 44
iterable getComponents()

Returns immediate child components.

Return Value

iterable