Representation of an event

Encapsulates the target context and parameters passed, and provides some behavior for interacting with the event manager.

category Zend
package Zend_View

 Methods

Constructor

__construct(string $name, string | object $target, array | \ArrayAccess $params) 
Inherited

Accept a target and its parameters.

inherited_from \Zend\EventManager\Event::__construct()

Parameters

$name

string

Event name

$target

stringobject

$params

array\ArrayAccess

Retrieve the view model

getModel() : null | \Zend\View\Model\ModelInterface

Get event name

getName() : string
Inherited

inherited_from \Zend\EventManager\Event::getName()

Returns

string

Get event parameter

getParam(string $name, mixed $default) : mixed

If the parameter does not exist, the $default value will be returned.

Parameters

$name

string

$default

mixed

Returns

mixed

Get all event parameters

getParams() : array | \ArrayAccess

Returns

array\ArrayAccess

Get value for renderer

getRenderer() : null | \Zend\View\Renderer\RendererInterface

Retrieve the MVC request object

getRequest() : null | \Zend\Stdlib\RequestInterface

Retrieve the MVC response object

getResponse() : null | \Zend\Stdlib\ResponseInterface

Retrieve the result of rendering

getResult() : mixed

Returns

mixed

Get the event target

getTarget() : string | object
Inherited

This may be either an object, or the name of a static method.

inherited_from \Zend\EventManager\Event::getTarget()

Returns

stringobject

Is propagation stopped?

propagationIsStopped() : bool
Inherited

inherited_from \Zend\EventManager\Event::propagationIsStopped()

Returns

bool

Set the view model

setModel(\Zend\View\Model\ModelInterface $model) : \Zend\View\ViewEvent

Set the event name

setName(string $name) : \Zend\EventManager\Event
Inherited

inherited_from \Zend\EventManager\Event::setName()

Parameters

$name

string

Returns

Set an individual event parameter

setParam(string $name, mixed $value) : \Zend\View\ViewEvent

Parameters

$name

string

$value

mixed

Returns

Set event parameters

setParams(array | object | \ArrayAccess $params) : \Zend\View\ViewEvent

Overwrites parameters

Parameters

$params

arrayobject\ArrayAccess

Exceptions

\Zend\EventManager\Exception\InvalidArgumentException

Returns

Set value for renderer

setRenderer(\Zend\View\Renderer\RendererInterface $renderer) : \Zend\View\ViewEvent

Set the MVC request object

setRequest(\Zend\Stdlib\RequestInterface $request) : \Zend\View\ViewEvent

Set the MVC response object

setResponse(\Zend\Stdlib\ResponseInterface $response) : \Zend\View\ViewEvent

Set result of rendering

setResult(mixed $result) : \Zend\View\ViewEvent

Parameters

$result

mixed

Returns

Set the event target/context

setTarget(null | string | object $target) : \Zend\EventManager\Event
Inherited

inherited_from \Zend\EventManager\Event::setTarget()

Parameters

$target

nullstringobject

Returns

Stop further event propagation

stopPropagation(bool $flag) : void
Inherited

inherited_from \Zend\EventManager\Event::stopPropagation()

Parameters

$flag

bool

 Properties

 

$model

$model : null | \Zend\View\Model\ModelInterface

 

<p>Event name</p>

$name : string
Inherited

inherited_from \Zend\EventManager\Event::$$name
 

<p>The event parameters</p>

$params : array | \ArrayAccess | object
Inherited

inherited_from \Zend\EventManager\Event::$$params
 

$renderer

$renderer : \Zend\View\Renderer\RendererInterface

 

$request

$request : null | \Zend\Stdlib\RequestInterface

 

$response

$response : null | \Zend\Stdlib\ResponseInterface

 

$result

$result : mixed

 

<p>Whether or not to stop propagation</p>

$stopPropagation : bool
Inherited

inherited_from \Zend\EventManager\Event::$$stopPropagation
 

<p>The event target</p>

$target : string | object
Inherited

inherited_from \Zend\EventManager\Event::$$target

 Constants

 

EVENT_RENDERER

EVENT_RENDERER 

 

EVENT_RESPONSE

EVENT_RESPONSE