Class ComponentContainer (namespace Nette)
ComponentContainer is default implementation of IComponentContainer.
Implements interfaces:
Direct Known Sub-classes:
| Method Summary | |
|---|---|
| void |
Adds the specified component to the IComponentContainer.
|
| protected void |
createComponent
(string $name)
Component factory. Descendant can override this method to enable lazy component loading.
|
| IComponent|NULL |
getComponent
(string $name, [bool $need =
TRUE])
Returns component specified by name or path.
|
| ArrayIterator |
Iterates over a components.
|
| NULL|IComponent |
isCloning
()
Is container cloning now?
|
| void |
removeComponent
(IComponent $component)
Removes a component from the IComponentContainer.
|
| protected void |
validateChildComponent
(IComponent $child)
Descendant can override this method to disallow insert a child by throwing an \InvalidStateException.
|
| void |
__clone
()
Object cloning.
|
| Method Details | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
line 60 addComponentpublic void addComponent (IComponent $component, string $name, [string $insertBefore = Adds the specified component to the IComponentContainer. Overridden in child classes as: Implementation of:
|
||||||||||||||||||||||||
|
line 167 createComponentprotected void createComponent (string $name) Component factory. Descendant can override this method to enable lazy component loading.
|
||||||||||||||||||||||||
|
line 137 getComponentpublic IComponent|NULL getComponent (string $name, [bool $need = Returns component specified by name or path. Implementation of:
|
||||||||||||||||||||||||
|
line 179 getComponentspublic ArrayIterator getComponents ([bool $deep = Iterates over a components. Implementation of:
|
||||||||||||||||||||||||
|
line 233 isCloningpublic NULL|IComponent isCloning () Is container cloning now?
|
||||||||||||||||||||||||
|
line 118 removeComponentpublic void removeComponent (IComponent $component) Removes a component from the IComponentContainer. Implementation of:
|
||||||||||||||||||||||||
|
line 200 validateChildComponentprotected void validateChildComponent (IComponent $child) Descendant can override this method to disallow insert a child by throwing an \InvalidStateException.
|
||||||||||||||||||||||||
|
line 213 __clonepublic void __clone () Object cloning.
|
||||||||||||||||||||||||