Zend Framework
3.0
|
Representation of an event. More...
Public Member Functions | |
__construct ($name=null, $target=null, $params=null) | |
Constructor. | |
getName () | |
Get event name. | |
getTarget () | |
Get the event target. | |
setParams ($params) | |
Set parameters. | |
getParams () | |
Get all parameters. | |
getParam ($name, $default=null) | |
Get an individual parameter. | |
setName ($name) | |
Set the event name. | |
setTarget ($target) | |
Set the event target/context. | |
setParam ($name, $value) | |
Set an individual parameter to a value. | |
stopPropagation ($flag=true) | |
Stop further event propagation. | |
propagationIsStopped () | |
Is propagation stopped? | |
Protected Attributes | |
$name | |
$target | |
$params = [] | |
$stopPropagation = false | |
Representation of an event.
Encapsulates the target context and parameters passed, and provides some behavior for interacting with the event manager.
__construct | ( | $name = null , |
|
$target = null , |
|||
$params = null |
|||
) |
Constructor.
Accept a target and its parameters.
string | $name | Event name |
string | object | $target | |
array | ArrayAccess | $params |
getName | ( | ) |
getParam | ( | $name, | |
$default = null |
|||
) |
Get an individual parameter.
If the parameter does not exist, the $default value will be returned.
string | int | $name | |
mixed | $default |
Implements EventInterface.
getParams | ( | ) |
getTarget | ( | ) |
Get the event target.
This may be either an object, or the name of a static method.
Implements EventInterface.
propagationIsStopped | ( | ) |
setName | ( | $name | ) |
setParam | ( | $name, | |
$value | |||
) |
Set an individual parameter to a value.
string | int | $name | |
mixed | $value |
Implements EventInterface.
setParams | ( | $params | ) |
Set parameters.
Overwrites parameters
array | ArrayAccess | object | $params |
Exception\InvalidArgumentException |
Implements EventInterface.
setTarget | ( | $target | ) |
stopPropagation | ( | $flag = true | ) |
|
protected |
|
protected |
|
protected |
|
protected |