Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Utils
  • none
  • Tracy
    • Bridges
      • Nette

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
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
type
$need
exception if component doesn't exist?

Returns

Nette\ComponentModel\IComponent
IComponent
public string
# lookupPath( string $type = NULL, 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
type
$need
exception if component doesn't exist?

Returns

string
string
public
# monitor( string $type )

Starts monitoring.

Starts monitoring.

Parameters

$type
type
public
# unmonitor( string $type )

Stops monitoring.

Stops monitoring.

Parameters

$type
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
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
public string
# getName( )

Returns

string
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
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
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.3-20161221 API API documentation generated by ApiGen 2.8.0