Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • none

Classes

Interfaces

  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class ComponentContainer

ComponentContainer is default implementation of IContainer.

Object
Extended by Component implements IComponent
Extended by ComponentContainer implements IComponentContainer

Direct known subclasses

FormContainer, PresenterComponent

Indirect known subclasses

AppForm, Control, Form, Multiplier, Presenter
Package: Nette\ComponentModel
Author: David Grudl
Located at ComponentModel/Container.php
Methods summary
public ComponentContainer
# addComponent( IComponent $component, string $name, string $insertBefore = NULL )

Adds the specified component to the IContainer.

Adds the specified component to the IContainer.

Parameters

$component
IComponent
$name
string
$insertBefore
string

Returns

ComponentContainer

Throws

InvalidStateException

Implementation of

IComponentContainer::addComponent()
public
# removeComponent( IComponent $component )

Removes a component from the IContainer.

Removes a component from the IContainer.

Parameters

$component
IComponent

Implementation of

IComponentContainer::removeComponent()
public IComponent|null
# getComponent( string $name, boolean $need = TRUE )

Returns component specified by name or path.

Returns component specified by name or path.

Parameters

$name
string
$need
boolean
throw exception if component doesn't exist?

Returns

IComponent|null

Implementation of

IComponentContainer::getComponent()
protected IComponent
# createComponent( string $name )

Component factory. Delegates the creation of components to a createComponent<Name> method.

Component factory. Delegates the creation of components to a createComponent<Name> method.

Parameters

$name
string
component name

Returns

IComponent
the created component (optionally)
public ArrayIterator
# getComponents( boolean $deep = FALSE, string $filterType = NULL )

Iterates over components.

Iterates over components.

Parameters

$deep
boolean
recursive?
$filterType
string
class types filter

Returns

ArrayIterator

Implementation of

IComponentContainer::getComponents()
protected
# validateChildComponent( IComponent $child )

Descendant can override this method to disallow insert a child by throwing an InvalidStateException.

Descendant can override this method to disallow insert a child by throwing an InvalidStateException.

Throws

InvalidStateException
public
# __clone( )

Object cloning.

Object cloning.

Overrides

Component::__clone()
Methods inherited from Component
__construct(), __sleep(), __wakeup(), attached(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), unmonitor(), validateParent()
Methods inherited from Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Methods inherited from IComponent
setParent()
Constants inherited from IComponent
NAME_SEPARATOR
Magic properties summary
public read-only ArrayIterator $components
#
Magic properties inherited from Component
$name, $parent
Magic properties inherited from Object
$reflection
Nette Framework 2.0.18 (for PHP 5.2, un-prefixed) API documentation generated by ApiGen 2.8.0