Namespaces

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

Classes

  • AppForm
  • Application
  • CliRouter
  • Control
  • DownloadResponse
  • ForwardingResponse
  • JsonResponse
  • Link
  • MultiRouter
  • Presenter
  • PresenterComponent
  • PresenterLoader
  • PresenterRequest
  • RedirectingResponse
  • RenderResponse
  • Route
  • SimpleRouter

Interfaces

  • IPartiallyRenderable
  • IPresenter
  • IPresenterLoader
  • IPresenterResponse
  • IRenderable
  • IRouter
  • ISignalReceiver
  • IStatePersistent

Exceptions

  • AbortException
  • ApplicationException
  • BadRequestException
  • BadSignalException
  • ForbiddenRequestException
  • InvalidLinkException
  • InvalidPresenterException
  • Overview
  • Namespace
  • Class
  • Tree
  • Other releases

Class PresenterComponent

PresenterComponent is the base class for all presenters components.

Components are persistent objects located on a presenter. They have ability to own other child components, and interact with user. Components have properties for storing their status, and responds to user command.

Nette\Object
Extended by Nette\Component implements Nette\IComponent
Extended by Nette\ComponentContainer implements Nette\IComponentContainer
Extended by Nette\Application\PresenterComponent implements Nette\Application\ISignalReceiver, Nette\Application\IStatePersistent, ArrayAccess

Direct known subclasses

Nette\Application\Control

Indirect known subclasses

Nette\Application\Presenter
Abstract
Namespace: Nette\Application
Author: David Grudl
Located at Application/PresenterComponent.php
Methods summary
public
# __construct( Nette\IComponentContainer $parent = NULL, $name = NULL )
public Nette\Application\Presenter|null
# getPresenter( boolean $need = TRUE )

Returns the presenter where this component belongs to.

Returns the presenter where this component belongs to.

Parameters

$need
boolean
throw exception if presenter doesn't exist?

Returns

Nette\Application\Presenter|null
public string
# getUniqueId( )

Returns a fully-qualified name that uniquely identifies the component within the presenter hierarchy.

Returns a fully-qualified name that uniquely identifies the component within the presenter hierarchy.

Returns

string
protected
# attached( IComponent $presenter )

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

$presenter
IComponent
protected boolean
# tryCall( string $method, array $params )

Calls public method if exists.

Calls public method if exists.

Parameters

$method
string
$params
array

Returns

boolean
does method exist?
public static PresenterComponentReflection
# getReflection( )

Access to reflection.

Access to reflection.

Returns

PresenterComponentReflection
public
# loadState( array $params )

Loads state informations.

Loads state informations.

Parameters

$params
array

Implementation of

Nette\Application\IStatePersistent::loadState
public
# saveState( array & $params, PresenterComponentReflection $reflection = NULL )

Saves state informations for next request.

Saves state informations for next request.

Parameters

$params
array
$reflection
PresenterComponentReflection
(internal, used by Presenter)

Implementation of

Nette\Application\IStatePersistent::saveState
final public mixed
# getParam( string $name = NULL, mixed $default = NULL )

Returns component param. If no key is passed, returns the entire array.

Returns component param. If no key is passed, returns the entire array.

Parameters

$name
string
key
$default
mixed
default value

Returns

mixed
final public string
# getParamId( $name )

Returns a fully-qualified name that uniquely identifies the parameter.

Returns a fully-qualified name that uniquely identifies the parameter.

Returns

string
public static array
# getPersistentParams( )

Returns array of classes persistent parameters. They have public visibility and are non-static. This default implementation detects persistent parameters by annotation @persistent.

Returns array of classes persistent parameters. They have public visibility and are non-static. This default implementation detects persistent parameters by annotation @persistent.

Returns

array
public
# signalReceived( string $signal )

Calls signal handler method.

Calls signal handler method.

Parameters

$signal
string

Throws

Nette\Application\BadSignalException
if there is not handler method

Implementation of

Nette\Application\ISignalReceiver::signalReceived
public string
# formatSignalMethod( string $signal )

Formats signal handler method name -> case sensitivity doesn't matter.

Formats signal handler method name -> case sensitivity doesn't matter.

Parameters

$signal
string

Returns

string
public string
# link( string $destination, array|mixed $args = array() )

Generates URL to presenter, action or signal.

Generates URL to presenter, action or signal.

Parameters

$destination
string
destination in format "[[module:]presenter:]action" or "signal!" or "this"
$args
array|mixed

Returns

string

Throws

Nette\Application\InvalidLinkException
public Nette\Application\Link
# lazyLink( string $destination, array|mixed $args = array() )

Returns destination as Link object.

Returns destination as Link object.

Parameters

$destination
string
destination in format "[[module:]presenter:]view" or "signal!"
$args
array|mixed

Returns

Nette\Application\Link
public
# redirect( integer $code, string $destination = NULL, array|mixed $args = array() )

Redirect to another presenter, action or signal.

Redirect to another presenter, action or signal.

Parameters

$code
integer
[optional] HTTP error code
$destination
string
destination in format "[[module:]presenter:]view" or "signal!"
$args
array|mixed

Throws

Nette\Application\AbortException
final public
# offsetSet( string $name, Nette\IComponent $component )

Adds the component to the container.

Adds the component to the container.

Parameters

$name
string
component name
$component
Nette\IComponent

Implementation of

ArrayAccess::offsetSet
final public Nette\IComponent
# offsetGet( string $name )

Returns component specified by name. Throws exception if component doesn't exist.

Returns component specified by name. Throws exception if component doesn't exist.

Parameters

$name
string
component name

Returns

Nette\IComponent

Throws

InvalidArgumentException

Implementation of

ArrayAccess::offsetGet
final public boolean
# offsetExists( string $name )

Does component specified by name exists?

Does component specified by name exists?

Parameters

$name
string
component name

Returns

boolean

Implementation of

ArrayAccess::offsetExists
final public
# offsetUnset( string $name )

Removes component from the container.

Removes component from the container.

Parameters

$name
string
component name

Implementation of

ArrayAccess::offsetUnset
Methods inherited from Nette\ComponentContainer
__clone(), addComponent(), createComponent(), getComponent(), getComponents(), removeComponent(), validateChildComponent()
Methods inherited from Nette\Component
__wakeup(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent()
Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod()
Constants inherited from Nette\IComponent
NAME_SEPARATOR
Properties summary
protected array $params array()
#
Nette Framework 0.9.7 API documentation generated by ApiGen 2.3.0