Class NComponent (namespace Nette)
NComponent is the base class for all components.
Components are objects implementing IComponent. They has parent component and own name.
NObject | --NComponent
Implements interfaces:
Direct Known Sub-classes:
Public Method Summary | |
---|---|
NComponent |
|
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.
|
NComponent |
Sets the parent of this component. This method is managed by containers and should.
|
void |
unmonitor
(string $type)
Stops monitoring.
|
void |
__clone
()
NObject 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 NObject |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Method Details | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 55 __constructpublic NComponent __construct ([IComponentContainer $parent = Overridden in child classes as:
NPresenterComponent::__construct(), NRepeaterControl::__construct(), NForm::__construct(), NAppForm::__construct(), NFormControl::__construct(), NButton::__construct(), NSubmitButton::__construct(), NImageButton::__construct(), NCheckbox::__construct(), NFileUpload::__construct(), NHiddenField::__construct(), NRadioList::__construct(), NSelectBox::__construct(), NTextArea::__construct(), NTextInput::__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 NComponent 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 () NObject cloning. Overridden in child classes as:
|
|||||||||||||||||||||
line 358 __wakeuppublic void __wakeup () Prevents unserialization.
|