Component
abstract class Component extends Object implements IComponent
Component is the base class for all components.
Components are objects implementing IComponent. They has parent component and own name.
Properties
string read-only | $name | ||
IContainer|null read-only | $parent |
Methods
Lookup hierarchy for component specified by class or interface name.
Lookup for component specified by class or interface name. Returns backtrace path.
Starts monitoring.
Stops monitoring.
This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.
This method will be called before the component (or component's parent) becomes detached from a monitored object. Do not call this method yourself.
No description
Returns the container if any.
Sets the parent of this component. This method is managed by containers and should not be called by applications
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 Nette\InvalidStateException
Object cloning.
Prevents serialization.
Prevents unserialization.
Details
at line 33
__construct(IContainer $parent = NULL, $name = NULL)
No description
at line 50
IComponent
lookup($type, $need = TRUE)
Lookup hierarchy for component specified by class or interface name.
at line 92
string
lookupPath($type = NULL, $need = TRUE)
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.
at line 104
void
monitor($type)
Starts monitoring.
at line 120
void
unmonitor($type)
Stops monitoring.
at line 132
protected void
attached($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.
at line 143
protected void
detached($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.
at line 154
string
getName()
No description
at line 164
IContainer|null
getParent()
Returns the container if any.
at line 179
void
setParent(IContainer $parent = NULL, $name = NULL)
internal |
Sets the parent of this component. This method is managed by containers and should not be called by applications
at line 219
protected void
validateParent(IContainer $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 Nette\InvalidStateException
at line 295
__clone()
Object cloning.
at line 316
__sleep()
Prevents serialization.
at line 325
__wakeup()
Prevents unserialization.