PresenterComponent
abstract class PresenterComponent extends ComponentContainer implements ISignalReceiver, IStatePersistent, ArrayAccess
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.
Properties
protected array | $params | ||
Presenter read-only | $presenter |
Methods
No description
Returns the presenter where this component belongs to.
Returns a fully-qualified name that uniquely identifies the component within the presenter hierarchy.
This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.
Calls public method if exists.
Loads state informations.
Saves state informations for next request.
Returns component param.
Returns a fully-qualified name that uniquely identifies the parameter.
Returns array of classes persistent parameters. They have public visibility and are non-static.
Calls signal handler method.
Formats signal handler method name -> case sensitivity doesn't matter.
Generates URL to presenter, action or signal.
Redirect to another presenter, action or signal.
Adds the component to the container.
Returns component specified by name. Throws exception if component doesn't exist.
Does component specified by name exists?
Removes component from the container. Throws exception if component doesn't exist.
Details
at line 54
__construct(IComponentContainer $parent = NULL, $name = NULL)
No description
at line 67
Presenter|null
getPresenter($need = TRUE)
Returns the presenter where this component belongs to.
at line 79
string
getUniqueId()
Returns a fully-qualified name that uniquely identifies the component within the presenter hierarchy.
at line 92
protected void
attached($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.
at line 107
protected bool
tryCall($method, array $params)
Calls public method if exists.
at line 129
void
loadState(array $params)
Loads state informations.
at line 151
void
saveState(array $params, $forClass = NULL)
Saves state informations for next request.
at line 192
final mixed
getParam($name = NULL, $default = NULL)
Returns component param.
If no key is passed, returns the entire array.
at line 211
final string
getParamId($name)
Returns a fully-qualified name that uniquely identifies the parameter.
at line 224
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.
at line 248
void
signalReceived($signal)
Calls signal handler method.
at line 262
string
formatSignalMethod($signal)
Formats signal handler method name -> case sensitivity doesn't matter.
at line 280
string
link($destination, $args = array())
Generates URL to presenter, action or signal.
at line 303
Link
lazyLink($destination, $args = array())
Returns destination as Link object.
at line 318
ajaxLink($destination, $args = array())
deprecated
deprecated
No description
at line 333
void
redirect($code, $destination = NULL, $args = array())
Redirect to another presenter, action or signal.
at line 362
final
offsetSet($name, $component)
Adds the component to the container.
at line 375
final IComponent
offsetGet($name)
Returns component specified by name. Throws exception if component doesn't exist.
at line 387
final bool
offsetExists($name)
Does component specified by name exists?
at line 399
final void
offsetUnset($name)
Removes component from the container. Throws exception if component doesn't exist.