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 NComponentContainer

ComponentContainer is default implementation of IContainer.

NObject
Extended by NComponent implements IComponent
Extended by NComponentContainer implements IComponentContainer

Direct known subclasses

NFormContainer, NPresenterComponent

Indirect known subclasses

NAppForm, NControl, NForm, NMultiplier, NPresenter
Package: Nette\ComponentModel
Author: David Grudl
Located at ComponentModel/Container.php
Methods summary
public NComponentContainer
# 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

NComponentContainer

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

NComponent::__clone()
Methods inherited from NComponent
__construct(), __sleep(), __wakeup(), attached(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), unmonitor(), validateParent()
Methods inherited from NObject
__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 NComponent
$name, $parent
Magic properties inherited from NObject
$reflection
Nette Framework 2.0.18 (for PHP 5.2, prefixed) API documentation generated by ApiGen 2.8.0