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
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Tokenizer
    • Utils
  • Tracy
    • Bridges
      • Nette
  • none

Classes

  • Component
  • Container

Interfaces

  • IComponent
  • IContainer
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated

Class Component

Component is the base class for all components.

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

Nette\ComponentModel\Component implements Nette\ComponentModel\IComponent uses Nette\SmartObject

Direct known subclasses

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

Indirect known subclasses

Nette\Application\UI\Component, Nette\Application\UI\Control, 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\Form, Nette\Forms\Controls\TextInput, Nette\Forms\Controls\UploadControl, Nette\Forms\Form, Nette\Application\UI\Multiplier, Nette\Application\UI\Presenter, 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( )
public Nette\ComponentModel\IComponent|null
# lookup( string|null $type, boolean $throw = true )

Lookup hierarchy for component specified by class or interface name.

Lookup hierarchy for component specified by class or interface name.

Parameters

$type
$throw

Returns

Nette\ComponentModel\IComponent|null
IComponent|null
public string|null
# lookupPath( string|null $type = null, boolean $throw = 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
$throw

Returns

string|null
string|null
public
# monitor( string $type )

Starts monitoring.

Starts monitoring.

Parameters

$type
public
# unmonitor( string $type )

Stops monitoring.

Stops monitoring.

Parameters

$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|null
# getName( )

Returns

string|null
string|null

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\ComponentModel\IComponent
setParent()
Methods used from Nette\SmartObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants inherited from Nette\ComponentModel\IComponent
NAME_SEPARATOR
Magic properties summary
public read-only string $name
public read-only Nette\ComponentModel\IContainer|null $parent
Nette 2.4-20170829 API API documentation generated by ApiGen 2.8.0