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
파일 보기 프로젝트 열기: nette/component-model 1 사용 예제들

공개 메소드들

메소드 설명
__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