EventManager/Event.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_EventManager
\Zend_EventManager_Event
Package: Zend_EventManager


Returns





Returns

Representation of an event
Encapsulates the target context and parameters passed, and provides some
behavior for interacting with the event manager.
- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

array|\ArrayAccess|object $params = array()The event parameters
Default value
array()Details- Type
- array | \ArrayAccess | object
Methods

__construct(string $name = null, string | object $target = null, array | \ArrayAccess $params = null) : voidConstructor
Accept a target and its parameters.
Parameters| Name | Type | Description |
|---|---|---|
| $name | string | Event name |
| $target | string | object | |
| $params | array | \ArrayAccess |

getParam(string | int $name, mixed $default = null) : mixedGet an individual parameter
If the parameter does not exist, the $default value will be returned.
Parameters| Name | Type | Description |
|---|---|---|
| $name | string | int | |
| $default | mixed |
| Type | Description |
|---|---|
| mixed |

getParams() : array | object | \ArrayAccessGet all parameters
Returns
| Type | Description |
|---|---|
| array | object | \ArrayAccess |

getTarget() : string | objectGet the event target
This may be either an object, or the name of a static method.
Returns| Type | Description |
|---|---|
| string | object |

setName(string $name) : \Zend_EventManager_EventSet the event name
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \Zend_EventManager_Event |

setParam(string | int $name, mixed $value) : \Zend_EventManager_EventSet an individual parameter to a value
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $name | string | int | |
| $value | mixed |
| Type | Description |
|---|---|
| \Zend_EventManager_Event |

setParams(array | \ArrayAccess | object $params) : \EventSet parameters
Overwrites parameters
Parameters| Name | Type | Description |
|---|---|---|
| $params | array | \ArrayAccess | object |
| Type | Description |
|---|---|
| \Event |

setTarget(null | string | object $target) : \Zend_EventManager_EventSet the event target/context
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $target | null | string | object |
| Type | Description |
|---|---|
| \Zend_EventManager_Event |