Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
      • Traits
    • Reflection
    • Security
    • Tokenizer
    • Utils
  • Tracy
    • Bridges
      • Nette
  • none

Classes

  • Component
  • Container
  • RecursiveComponentIterator

Interfaces

  • IComponent
  • IContainer

Traits

  • ArrayAccess
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases

Class Container

ComponentContainer is default implementation of IContainer.

Nette\ComponentModel\Component implements Nette\ComponentModel\IComponent uses Nette\SmartObject
Extended by Nette\ComponentModel\Container implements Nette\ComponentModel\IContainer

Direct known subclasses

Nette\Application\UI\Component, 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
Located at ComponentModel/Container.php
Methods summary
public Nette\ComponentModel\Container
# addComponent( Nette\ComponentModel\IComponent $component, string|integer $name, $insertBefore = null )

Adds the component to the container.

Adds the component to the container.

Parameters

$component
$name
$name
$insertBefore
$insertBefore

Returns

Nette\ComponentModel\Container
static

Throws

Nette\InvalidStateException
Nette\InvalidStateException

Implementation of

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

Removes the component from the container.

Removes the component from the container.

Implementation of

Nette\ComponentModel\IContainer::removeComponent()
public Nette\ComponentModel\IComponent|null
# getComponent( string|integer $name, boolean $throw = true )

Returns component specified by name or path.

Returns component specified by name or path.

Parameters

$name
$throw
throw exception if component doesn't exist?

Returns

Nette\ComponentModel\IComponent|null
IComponent|null

Implementation of

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

Returns

Nette\ComponentModel\IComponent|null
IComponent|null
public Iterator
# getComponents( boolean $deep = false, string $filterType = null )

Iterates over descendants components.

Iterates over descendants components.

Parameters

$deep
return all descendant?
$filterType
class type to return

Returns

Iterator
\Iterator

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
Nette\InvalidStateException
public
# __clone( )

Object cloning.

Object cloning.

Overrides

Nette\ComponentModel\Component::__clone()
public Nette\ComponentModel\Container|null
# _isCloning( )

Is container cloning now?

Is container cloning now?

Returns

Nette\ComponentModel\Container|null
Container|null

Internal

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