Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • none

Classes

Interfaces

  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class NComponent

Component is the base class for all components.

Components are objects implementing IComponent. They has parent component and own name.

NObject
Extended by NComponent implements IComponent

Direct known subclasses

NComponentContainer, NFormControl

Indirect known subclasses

NAppForm, NButton, NPresenter, NPresenterComponent, NRadioList, NSelectBox, NSubmitButton, NTextArea, NTextBase, NTextInput, NUploadControl, NCheckbox, NControl, NForm, NFormContainer, NHiddenField, NImageButton, NMultiplier, NMultiSelectBox
Abstract
Package: Nette\ComponentModel
Author: David Grudl
Located at ComponentModel/Component.php
Methods summary
public
# __construct( IComponentContainer $parent = NULL, $name = NULL )
public IComponent
# lookup( string $type, boolean $need = TRUE )

Lookup hierarchy for component specified by class or interface name.

Lookup hierarchy for component specified by class or interface name.

Parameters

$type
string
class/interface type
$need
boolean
throw exception if component doesn't exist?

Returns

IComponent
public string
# lookupPath( string $type, boolean $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.

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.

Parameters

$type
string
class/interface type
$need
boolean
throw exception if component doesn't exist?

Returns

string
public
# monitor( string $type )

Starts monitoring.

Starts monitoring.

Parameters

$type
string
class/interface type
public
# unmonitor( string $type )

Stops monitoring.

Stops monitoring.

Parameters

$type
string
class/interface type
protected
# 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.

This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.

Parameters

$obj
IComponent
protected
# 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.

This method will be called before the component (or component's parent) becomes detached from a monitored object. Do not call this method yourself.

Parameters

$obj
IComponent
public string
# getName( )

Returns

string

Implementation of

IComponent::getName()
public IComponentContainer|null
# getParent( )

Returns the container if any.

Returns the container if any.

Returns

IComponentContainer|null

Implementation of

IComponent::getParent()
protected
# 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

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

Throws

InvalidStateException
public
# __clone( )

Object cloning.

Object cloning.

public
# __sleep( )

Prevents serialization.

Prevents serialization.

public
# __wakeup( )

Prevents unserialization.

Prevents unserialization.

Methods inherited from NObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Methods inherited from IComponent
setParent()
Constants inherited from IComponent
NAME_SEPARATOR
Magic properties summary
public read-only string $name
#
public read-only IComponentContainer|null $parent
#
Magic properties inherited from NObject
$reflection
Nette Framework 2.0.18 (for PHP 5.2, prefixed) API documentation generated by ApiGen 2.8.0