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:
Public Method Summary | |
---|---|
Component |
|
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).
|
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 57 __constructpublic Component __construct ([IComponentContainer $parent = Overridden in child classes as:
PresenterComponent::__construct(), Presenter::__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 152 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 164 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 177 getNamepublic string getName () Implementation of:
|
|||||||||||||||||||||
line 188 getParentpublic IComponentContainer|NULL getParent () Returns the container if any. Implementation of:
|
|||||||||||||||||||||
line 344 getServicepublic object getService (string $type) Gets the service (experimental).
|
|||||||||||||||||||||
line 326 getServiceLocatorpublic IServiceLocator getServiceLocator () Gets the service locator (experimental). Implementation of:
|
|||||||||||||||||||||
line 75 lookuppublic IComponent lookup (string $type, [bool $need = Lookup hierarchy for component specified by class or interface name.
|
|||||||||||||||||||||
line 123 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 137 monitorpublic void monitor (string $type) Starts monitoring.
|
|||||||||||||||||||||
line 204 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 315 setServiceLocatorpublic void setServiceLocator (IServiceLocator $locator) Sets the service location (experimental). Implementation of:
|
|||||||||||||||||||||
line 253 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 358 __clonepublic void __clone () Object cloning. Overridden in child classes as:
|
|||||||||||||||||||||
line 380 __wakeuppublic void __wakeup () Prevents unserialization.
|