Namespaces

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

Classes

  • ArrayTools
  • Callback
  • Component
  • ComponentContainer
  • Configurator
  • DateTime
  • Debug
  • Environment
  • Framework
  • FreezableObject
  • GenericRecursiveIterator
  • Image
  • ImageMagick
  • InstanceFilterIterator
  • Object
  • ObjectMixin
  • Paginator
  • RecursiveComponentIterator
  • ServiceLocator
  • SmartCachingIterator
  • String
  • Tools

Interfaces

  • IComponent
  • IComponentContainer
  • IDebuggable
  • IServiceLocator
  • ITranslator

Exceptions

  • AmbiguousServiceException
  • Overview
  • Namespace
  • Class
  • Tree
  • Other releases

Class Component

Component is the base class for all components.

Components are objects implementing IComponent. They has parent component and own name.

Nette\Object
Extended by Nette\Component implements Nette\IComponent

Direct known subclasses

Nette\ComponentContainer, Nette\Forms\FormControl

Indirect known subclasses

Nette\Application\AppForm, Nette\Application\Control, Nette\Forms\ImageButton, Nette\Forms\MultiSelectBox, Nette\Forms\RadioList, Nette\Forms\SelectBox, Nette\Forms\SubmitButton, Nette\Forms\TextArea, Nette\Forms\TextBase, Nette\Forms\TextInput, Nette\Application\Presenter, Nette\Application\PresenterComponent, Nette\Forms\Button, Nette\Forms\Checkbox, Nette\Forms\FileUpload, Nette\Forms\Form, Nette\Forms\FormContainer, Nette\Forms\HiddenField
Abstract
Namespace: Nette
Author: David Grudl
Located at ComponentModel/Component.php
Methods summary
public
# __construct( Nette\IComponentContainer $parent = NULL, $name = NULL )
public Nette\IComponent
# lookup( string $type, boolean $need = TRUE )

Lookup hierarchy for component specified by class or interface name.

Lookup hierarchy for component specified by class or interface name.

Parameters

$type
string
class/interface type
$need
boolean
throw exception if component doesn't exist?

Returns

Nette\IComponent
public string
# lookupPath( string $type, boolean $need = TRUE )

Lookup for component specified by class or interface name. Returns backtrace path. A path is the concatenation of component names separated by self::NAME_SEPARATOR.

Lookup for component specified by class or interface name. Returns backtrace path. A path is the concatenation of component names separated by self::NAME_SEPARATOR.

Parameters

$type
string
class/interface type
$need
boolean
throw exception if component doesn't exist?

Returns

string
public
# monitor( string $type )

Starts monitoring.

Starts monitoring.

Parameters

$type
string
class/interface type
public
# unmonitor( string $type )

Stops monitoring.

Stops monitoring.

Parameters

$type
string
class/interface type
protected
# attached( Nette\IComponent $obj )

This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.

This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.

Parameters

$obj
Nette\IComponent
protected
# detached( Nette\IComponent $obj )

This method will be called before the component (or component's parent) becomes detached from a monitored object. Do not call this method yourself.

This method will be called before the component (or component's parent) becomes detached from a monitored object. Do not call this method yourself.

Parameters

$obj
Nette\IComponent
final public string
# getName( )

Returns

string

Implementation of

Nette\IComponent::getName
final public Nette\IComponentContainer|null
# getParent( )

Returns the container if any.

Returns the container if any.

Returns

Nette\IComponentContainer|null

Implementation of

Nette\IComponent::getParent
public Nette\Component
# setParent( Nette\IComponentContainer $parent = NULL, string $name = NULL )

Sets the parent of this component. This method is managed by containers and should. not be called by applications

Sets the parent of this component. This method is managed by containers and should. not be called by applications

Parameters

$parent
Nette\IComponentContainer
New parent or null if this component is being removed from a parent
$name
string

Returns

Nette\Component
provides a fluent interface

Throws

InvalidStateException

Implementation of

Nette\IComponent::setParent
protected
# validateParent( Nette\IComponentContainer $parent )

Is called by a component when it is about to be set new parent. Descendant can override this method to disallow a parent change by throwing an \InvalidStateException

Is called by a component when it is about to be set new parent. Descendant can override this method to disallow a parent change by throwing an \InvalidStateException

Parameters

$parent
Nette\IComponentContainer

Throws

InvalidStateException
public
# __clone( )

Object cloning.

Object cloning.

final public
# __wakeup( )

Prevents unserialization.

Prevents unserialization.

Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants inherited from Nette\IComponent
NAME_SEPARATOR
Nette Framework 0.9.7 API documentation generated by ApiGen 2.3.0