Namespaces

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

Classes

  • Component
  • Container

Interfaces

  • IComponent
  • IContainer
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class Component

Component is the base class for all components.

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

Nette\Object
Extended by Nette\ComponentModel\Component implements Nette\ComponentModel\IComponent

Direct known subclasses

Nette\ComponentModel\Container, Nette\Forms\Controls\BaseControl

Indirect known subclasses

Nette\Application\UI\Control, Nette\Application\UI\Form, Nette\Forms\Controls\CsrfProtection, Nette\Forms\Controls\HiddenField, Nette\Forms\Controls\ImageButton, Nette\Forms\Controls\MultiChoiceControl, Nette\Forms\Controls\MultiSelectBox, Nette\Forms\Controls\RadioList, Nette\Forms\Controls\SelectBox, Nette\Forms\Controls\SubmitButton, Nette\Forms\Controls\TextArea, Nette\Forms\Controls\TextBase, Nette\Application\UI\Multiplier, Nette\Forms\Controls\TextInput, Nette\Forms\Controls\UploadControl, Nette\Forms\Form, Nette\Application\UI\Presenter, Nette\Application\UI\PresenterComponent, Nette\Forms\Container, Nette\Forms\Controls\Button, Nette\Forms\Controls\Checkbox, Nette\Forms\Controls\CheckboxList, Nette\Forms\Controls\ChoiceControl
Abstract
Namespace: Nette\ComponentModel
Author: David Grudl
Located at ComponentModel/Component.php
Methods summary
public
# __construct( Nette\ComponentModel\IContainer $parent = NULL, $name = NULL )
public Nette\ComponentModel\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

Nette\ComponentModel\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( Nette\ComponentModel\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
Nette\ComponentModel\IComponent
protected
# detached( Nette\ComponentModel\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
Nette\ComponentModel\IComponent
public string
# getName( )

Returns

string

Implementation of

Nette\ComponentModel\IComponent::getName()
public Nette\ComponentModel\IContainer|null
# getParent( )

Returns the container if any.

Returns the container if any.

Returns

Nette\ComponentModel\IContainer|null

Implementation of

Nette\ComponentModel\IComponent::getParent()
protected
# validateParent( Nette\ComponentModel\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

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

Throws

Nette\InvalidStateException
public
# __clone( )

Object cloning.

Object cloning.

public
# __sleep( )

Prevents serialization.

Prevents serialization.

public
# __wakeup( )

Prevents unserialization.

Prevents unserialization.

Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Methods inherited from Nette\ComponentModel\IComponent
setParent()
Constants inherited from Nette\ComponentModel\IComponent
NAME_SEPARATOR
Magic properties summary
public read-only string $name
#
public read-only Nette\ComponentModel\IContainer|null $parent
#
Magic properties inherited from Nette\Object
$reflection
Nette 2.1 API documentation generated by ApiGen 2.8.0