Component
abstract class Component 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
No description
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 or removes 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 35
__construct()
No description
at line 53
IComponent|null
lookup($type, $throw = true)
Lookup hierarchy for component specified by class or interface name.
at line 95
string|null
lookupPath($type = null, $throw = 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 107
void
monitor($type)
Starts monitoring.
at line 123
void
unmonitor($type)
Stops monitoring.
at line 135
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 146
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 157
string|null
getName()
No description
at line 167
IContainer|null
getParent()
Returns the container if any.
at line 182
IComponent
setParent(IContainer $parent = null, $name = null)
internal |
Sets or removes the parent of this component. This method is managed by containers and should not be called by applications
at line 222
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 298
__clone()
Object cloning.
at line 319
__sleep()
Prevents serialization.
at line 328
__wakeup()
Prevents unserialization.