PHP Класс Nette\ComponentModel\Component

Components are objects implementing IComponent. They has parent component and own name.
Автор: David Grudl
Наследование: extends Nette\Object, implements Nette\ComponentModel\IComponent
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__clone ( ) Object cloning.
__construct ( )
__sleep ( ) Prevents serialization.
__wakeup ( ) Prevents unserialization.
getName ( ) : string
getParent ( ) : Nette\ComponentModel\IContainer | null Returns the container if any.
lookup ( $type, $need = TRUE ) : Nette\ComponentModel\IComponent Lookup hierarchy for component specified by class or interface name.
lookupPath ( $type = NULL, $need = TRUE ) : string Lookup for component specified by class or interface name. Returns backtrace path.
monitor ( $type ) : void Starts monitoring.
setParent ( Nette\ComponentModel\IContainer $parent = NULL, $name = NULL ) : self Sets the parent of this component. This method is managed by containers and should not be called by applications
unmonitor ( $type ) : void Stops monitoring.

Защищенные методы

Метод Описание
attached ( $obj ) : void This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.
detached ( $obj ) : void This method will be called before the component (or component's parent) becomes detached from a monitored object. Do not call this method yourself.
validateParent ( Nette\ComponentModel\IContainer $parent ) : void 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

Приватные методы

Метод Описание
refreshMonitors ( $depth, &$missing = NULL, &$listeners = [] ) : void Refreshes monitors.

Описание методов

__clone() публичный Метод

Object cloning.
public __clone ( )

__construct() публичный Метод

public __construct ( )

__sleep() публичный Метод

Prevents serialization.
public __sleep ( )

__wakeup() публичный Метод

Prevents unserialization.
public __wakeup ( )

attached() защищенный Метод

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 attached ( $obj ) : void
Результат void

detached() защищенный Метод

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 detached ( $obj ) : void
Результат void

getName() публичный Метод

public getName ( ) : string
Результат string

getParent() публичный Метод

Returns the container if any.
public getParent ( ) : Nette\ComponentModel\IContainer | null
Результат Nette\ComponentModel\IContainer | null

lookup() публичный Метод

Lookup hierarchy for component specified by class or interface name.
public lookup ( $type, $need = TRUE ) : Nette\ComponentModel\IComponent
Результат Nette\ComponentModel\IComponent

lookupPath() публичный Метод

A path is the concatenation of component names separated by self::NAME_SEPARATOR.
public lookupPath ( $type = NULL, $need = TRUE ) : string
Результат string

monitor() публичный Метод

Starts monitoring.
public monitor ( $type ) : void
Результат void

setParent() публичный Метод

Sets the parent of this component. This method is managed by containers and should not be called by applications
public setParent ( Nette\ComponentModel\IContainer $parent = NULL, $name = NULL ) : self
$parent Nette\ComponentModel\IContainer
Результат self

unmonitor() публичный Метод

Stops monitoring.
public unmonitor ( $type ) : void
Результат void

validateParent() защищенный Метод

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
protected validateParent ( Nette\ComponentModel\IContainer $parent ) : void
$parent Nette\ComponentModel\IContainer
Результат void