Class Component (namespace Nette)
Component is the base class for all components.
Components are objects implementing IComponent. They has parent component and own name.
Object | --Component
Implements interfaces:
Direct Known Sub-classes:
Public Method Summary | |
---|---|
Component |
|
string |
getName
()
|
IComponentContainer|NULL |
getParent
()
Returns the container if any.
|
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.
|
Component |
Sets the parent of this component. This method is managed by containers and should.
|
void |
unmonitor
(string $type)
Stops monitoring.
|
void |
__clone
()
Object cloning.
|
void |
__wakeup
()
Prevents unserialization.
|
Protected 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.
|
protected void |
validateParent
(IComponentContainer $parent)
Is called by a component when it is about to be set new parent. Descendant can
|
Methods Inherited From Object |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Method Details | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 55 __constructpublic Component __construct ([IComponentContainer $parent = Overridden in child classes as:
PresenterComponent::__construct(), RepeaterControl::__construct(), Form::__construct(), AppForm::__construct(), FormControl::__construct(), Button::__construct(), SubmitButton::__construct(), ImageButton::__construct(), Checkbox::__construct(), FileUpload::__construct(), HiddenField::__construct(), RadioList::__construct(), SelectBox::__construct(), TextArea::__construct(), TextInput::__construct()
|
|||||||||||||||||||||
line 159 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 171 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 184 getNamepublic string getName () Implementation of:
|
|||||||||||||||||||||
line 195 getParentpublic IComponentContainer|NULL getParent () Returns the container if any. Implementation of:
|
|||||||||||||||||||||
line 73 lookuppublic IComponent lookup (string $type, [bool $need = Lookup hierarchy for component specified by class or interface name.
|
|||||||||||||||||||||
line 113 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 127 monitorpublic void monitor (string $type) Starts monitoring.
|
|||||||||||||||||||||
line 211 setParentpublic Component 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 145 unmonitorpublic void unmonitor (string $type) Stops monitoring.
|
|||||||||||||||||||||
line 261 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 336 __clonepublic void __clone () Object cloning. Overridden in child classes as:
|
|||||||||||||||||||||
line 358 __wakeuppublic void __wakeup () Prevents unserialization.
|