Namespaces

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

Classes

  • Component
  • Container

Interfaces

  • IComponent
  • IContainer
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class Container

ComponentContainer is default implementation of IContainer.

Nette\Object
Extended by Nette\ComponentModel\Component implements Nette\ComponentModel\IComponent
Extended by Nette\ComponentModel\Container implements Nette\ComponentModel\IContainer

Direct known subclasses

Nette\Application\UI\PresenterComponent, Nette\Forms\Container

Indirect known subclasses

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

Adds the specified component to the IContainer.

Adds the specified component to the IContainer.

Parameters

$component
Nette\ComponentModel\IComponent
$name
string
$insertBefore
string

Returns

Nette\ComponentModel\Container

Throws

Nette\InvalidStateException

Implementation of

Nette\ComponentModel\IContainer::addComponent()
public
# removeComponent( Nette\ComponentModel\IComponent $component )

Removes a component from the IContainer.

Removes a component from the IContainer.

Parameters

$component
Nette\ComponentModel\IComponent

Implementation of

Nette\ComponentModel\IContainer::removeComponent()
public Nette\ComponentModel\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

Nette\ComponentModel\IComponent|null

Implementation of

Nette\ComponentModel\IContainer::getComponent()
protected Nette\ComponentModel\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

Nette\ComponentModel\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

Nette\ComponentModel\IContainer::getComponents()
protected
# validateChildComponent( Nette\ComponentModel\IComponent $child )

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

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

Throws

Nette\InvalidStateException
public
# __clone( )

Object cloning.

Object cloning.

Overrides

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