PHP Class Nette\ComponentModel\Container

Inheritance: extends Component, implements Nette\ComponentModel\IContainer
Exibir arquivo Open project: nette/component-model Class Usage Examples

Public Methods

Method Description
__clone ( ) Object cloning.
_isCloning ( ) : null | Nette\ComponentModel\IComponent Is container cloning now?
addComponent ( Nette\ComponentModel\IComponent $component, $name, $insertBefore = NULL ) : self Adds the specified component to the IContainer.
getComponent ( $name, $need = TRUE ) : Nette\ComponentModel\IComponent | null Returns component specified by name or path.
getComponents ( $deep = FALSE, $filterType = NULL ) : ArrayIterator Iterates over components.
removeComponent ( Nette\ComponentModel\IComponent $component ) : void Removes a component from the IContainer.

Protected Methods

Method Description
createComponent ( $name ) : Nette\ComponentModel\IComponent Component factory. Delegates the creation of components to a createComponent method.
validateChildComponent ( Nette\ComponentModel\IComponent $child ) : void Descendant can override this method to disallow insert a child by throwing an Nette\InvalidStateException.

Method Details

__clone() public method

Object cloning.
public __clone ( )

_isCloning() public method

Is container cloning now?
public _isCloning ( ) : null | Nette\ComponentModel\IComponent
return null | Nette\ComponentModel\IComponent

addComponent() public method

Adds the specified component to the IContainer.
public addComponent ( Nette\ComponentModel\IComponent $component, $name, $insertBefore = NULL ) : self
$component Nette\ComponentModel\IComponent
return self

createComponent() protected method

Component factory. Delegates the creation of components to a createComponent method.
protected createComponent ( $name ) : Nette\ComponentModel\IComponent
return Nette\ComponentModel\IComponent the created component (optionally)

getComponent() public method

Returns component specified by name or path.
public getComponent ( $name, $need = TRUE ) : Nette\ComponentModel\IComponent | null
return Nette\ComponentModel\IComponent | null

getComponents() public method

Iterates over components.
public getComponents ( $deep = FALSE, $filterType = NULL ) : ArrayIterator
return ArrayIterator

removeComponent() public method

Removes a component from the IContainer.
public removeComponent ( Nette\ComponentModel\IComponent $component ) : void
$component Nette\ComponentModel\IComponent
return void

validateChildComponent() protected method

Descendant can override this method to disallow insert a child by throwing an Nette\InvalidStateException.
protected validateChildComponent ( Nette\ComponentModel\IComponent $child ) : void
$child Nette\ComponentModel\IComponent
return void