Class ComponentContainer (namespace Nette)
ComponentContainer is default implementation of IComponentContainer.
Implements interfaces:
Direct Known Sub-classes:
Public Method Summary | |
---|---|
void |
Adds the specified component to the IComponentContainer.
|
IComponent|NULL |
getComponent
(string $name, [bool $need =
TRUE ])
Returns component specified by name or path.
|
ArrayIterator |
Iterates over a components.
|
void |
removeComponent
(IComponent $component)
Removes a component from the IComponentContainer.
|
void |
__clone
()
Object cloning.
|
Protected Method Summary | |
---|---|
protected void |
createComponent
(string $name)
Component factory. Descendant can override this method to enable lazy component loading.
|
protected void |
validateChildComponent
(IComponent $child)
Descendant can override this method to disallow insert a child by throwing an \InvalidStateException.
|
Methods Inherited From Component |
---|
__construct(), attached(), detached(), getName(), getParent(), getService(), getServiceLocator(), lookup(), lookupPath(), monitor(), setParent(), setServiceLocator(), validateParent(), __clone(), __wakeup() |
Methods Inherited From Object |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Method Details | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 58 addComponentpublic void addComponent (IComponent $component, string $name, [string $insertBefore = Adds the specified component to the IComponentContainer. Overridden in child classes as: Implementation of:
|
||||||||||||||||||||||||
line 165 createComponentprotected void createComponent (string $name) Component factory. Descendant can override this method to enable lazy component loading.
|
||||||||||||||||||||||||
line 135 getComponentpublic IComponent|NULL getComponent (string $name, [bool $need = Returns component specified by name or path. Implementation of:
|
||||||||||||||||||||||||
line 177 getComponentspublic ArrayIterator getComponents ([bool $deep = Iterates over a components. Implementation of:
|
||||||||||||||||||||||||
line 116 removeComponentpublic void removeComponent (IComponent $component) Removes a component from the IComponentContainer. Implementation of:
|
||||||||||||||||||||||||
line 199 validateChildComponentprotected void validateChildComponent (IComponent $child) Descendant can override this method to disallow insert a child by throwing an \InvalidStateException.
|
||||||||||||||||||||||||
line 212 __clonepublic void __clone () Object cloning.
|