Packages

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • NArrayTools
  • NCallback
  • NComponent
  • NComponentContainer
  • NConfigurator
  • NDateTime53
  • NDebug
  • NEnvironment
  • NFramework
  • NFreezableObject
  • NGenericRecursiveIterator
  • NImage
  • NImageMagick
  • NInstanceFilterIterator
  • NObject
  • NObjectMixin
  • NPaginator
  • NRecursiveComponentIterator
  • NServiceLocator
  • NSmartCachingIterator
  • NString
  • NTools

Interfaces

  • IComponent
  • IComponentContainer
  • IDebuggable
  • IServiceLocator
  • ITranslator

Exceptions

  • NAmbiguousServiceException
  • Overview
  • Package
  • Class
  • Tree
  • Other releases

Class NComponentContainer

ComponentContainer is default implementation of IComponentContainer.

NObject
Extended by NComponent implements IComponent
Extended by NComponentContainer implements IComponentContainer

Direct known subclasses

NFormContainer, NPresenterComponent

Indirect known subclasses

NAppForm, NControl, NForm, NPresenter
Package: Nette
Author: David Grudl
Located at ComponentModel/ComponentContainer.php
Methods summary
public
# addComponent( IComponent $component, string $name, string $insertBefore = NULL )

Adds the specified component to the IComponentContainer.

Adds the specified component to the IComponentContainer.

Parameters

$component
IComponent
$name
string
$insertBefore
string

Throws

InvalidStateException

Implementation of

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

Removes a component from the IComponentContainer.

Removes a component from the IComponentContainer.

Parameters

$component
IComponent

Implementation of

IComponentContainer::removeComponent
final 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)
final public ArrayIterator
# getComponents( boolean $deep = FALSE, string $filterType = NULL )

Iterates over a components.

Iterates over a 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.

Parameters

$child
IComponent

Throws

InvalidStateException
public
# __clone( )

Object cloning.

Object cloning.

Methods inherited from NComponent
__construct(), __wakeup(), attached(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent()
Methods inherited from NObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants inherited from IComponent
NAME_SEPARATOR
Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0