Class Component (namespace Nette)
Component is the base class for all components.
Components are objects implementing IComponent. They has parent component, own name and service locator.
Object | --Component
Implements interfaces:
Direct Known Sub-classes:
| Constructor Summary | |
|---|---|
| public |
|
| Method Summary | |
|---|---|
| protected void |
attached
(IComponent $obj)
This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.
|
| protected void |
detached
(IComponent $obj)
This method will be called before the component (or component's parent) becomes detached from a monitored object. Do not call this method yourself.
|
| string |
getName
()
|
| IComponentContainer|NULL |
getParent
()
Returns the container if any.
|
| object |
getService
(string $type)
Gets the service (experimental).
|
| IServiceLocator |
Gets the service locator (experimental).
|
| IComponent |
lookup
(string $type, [bool $need =
TRUE])
Lookup hierarchy for component specified by class or interface name.
|
| string |
lookupPath
(string $type, [bool $need =
TRUE])
Lookup for component specified by class or interface name. Returns backtrace path.
|
| void |
monitor
(string $type)
Starts monitoring.
|
| void |
Sets the parent of this component. This method is managed by containers and should.
|
| void |
setServiceLocator
(IServiceLocator $locator)
Sets the service location (experimental).
|
| protected void |
validateParent
(IComponentContainer $parent)
Is called by a component when it is about to be set new parent. Descendant can.
|
| void |
__clone
()
Object cloning.
|
| void |
__wakeup
()
Prevents unserialization.
|
| Constructor Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
line 59 __constructpublic __construct ([IComponentContainer $parent =
|
|||||||||
| Method Details | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
line 154 attachedprotected void attached (IComponent $obj) This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself. Overridden in child classes as:
|
|||||||||||||||||||||
|
line 166 detachedprotected void detached (IComponent $obj) This method will be called before the component (or component's parent) becomes detached from a monitored object. Do not call this method yourself.
|
|||||||||||||||||||||
|
line 179 getNamepublic string getName () Implementation of:
|
|||||||||||||||||||||
|
line 190 getParentpublic IComponentContainer|NULL getParent () Returns the container if any. Implementation of:
|
|||||||||||||||||||||
|
line 346 getServicepublic object getService (string $type) Gets the service (experimental).
|
|||||||||||||||||||||
|
line 328 getServiceLocatorpublic IServiceLocator getServiceLocator () Gets the service locator (experimental). Implementation of:
|
|||||||||||||||||||||
|
line 77 lookuppublic IComponent lookup (string $type, [bool $need = Lookup hierarchy for component specified by class or interface name.
|
|||||||||||||||||||||
|
line 125 lookupPathpublic string lookupPath (string $type, [bool $need = Lookup for component specified by class or interface name. Returns backtrace path. A path is the concatenation of component names separated by self::NAME_SEPARATOR.
|
|||||||||||||||||||||
|
line 139 monitorpublic void monitor (string $type) Starts monitoring.
|
|||||||||||||||||||||
|
line 206 setParentpublic void setParent ([IComponentContainer $parent = Sets the parent of this component. This method is managed by containers and should. not be called by applications Overridden in child classes as: Implementation of:
|
|||||||||||||||||||||
|
line 317 setServiceLocatorpublic void setServiceLocator (IServiceLocator $locator) Sets the service location (experimental). Implementation of:
|
|||||||||||||||||||||
|
line 255 validateParentprotected void validateParent (IComponentContainer $parent) Is called by a component when it is about to be set new parent. Descendant can. override this method to disallow a parent change by throwing an \InvalidStateException
|
|||||||||||||||||||||
|
line 360 __clonepublic void __clone () Object cloning. Overridden in child classes as:
|
|||||||||||||||||||||
|
line 382 __wakeuppublic void __wakeup () Prevents unserialization.
|
|||||||||||||||||||||