EventManager/Event.php

Show: inherited
Table of Contents

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 [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_EventManager  

\Zend_EventManager_Event

Package: Zend\EventManager

Representation of an event

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

Implements
\Zend_EventManager_EventDescription
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedstring $name =

<p>Event name</p>
Details
Type
string
Propertyprotectedarray|\ArrayAccess|object $params = array()

<p>The event parameters</p>
Default valuearray()Details
Type
array | \ArrayAccess | object
Propertyprotectedbool $stopPropagation = false

<p>Whether or not to stop propagation</p>
Default valuefalseDetails
Type
bool
Propertyprotectedstring|object $target =

<p>The event target</p>
Details
Type
string | object

Methods

methodpublic__construct(string $name = null, string | object $target = null, array | \ArrayAccess $params = null) : void

Constructor

Accept a target and its parameters.

Parameters
Name Type Description
$name string

Event name

$target string | object
$params array | \ArrayAccess
methodpublicgetName() : string

Get event name

Returns
Type Description
string
methodpublicgetParam(string | int $name, mixed $default = null) : mixed

Get an individual parameter

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

Parameters
Name Type Description
$name string | int
$default mixed
Returns
Type Description
mixed
methodpublicgetParams() : array | object | \ArrayAccess

Get all parameters

Returns
Type Description
array | object | \ArrayAccess
methodpublicgetTarget() : string | object

Get the event target

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

Returns
Type Description
string | object
methodpublicpropagationIsStopped() : bool

Is propagation stopped?

Returns
Type Description
bool
methodpublicsetName(string $name) : \Zend_EventManager_Event

Set the event name

Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_EventManager_Event
methodpublicsetParam(string | int $name, mixed $value) : \Zend_EventManager_Event

Set an individual parameter to a value

Parameters
Name Type Description
$name string | int
$value mixed
Returns
Type Description
\Zend_EventManager_Event
methodpublicsetParams(array | \ArrayAccess | object $params) : \Event

Set parameters

Overwrites parameters

Parameters
Name Type Description
$params array | \ArrayAccess | object
Returns
Type Description
\Event
methodpublicsetTarget(null | string | object $target) : \Zend_EventManager_Event

Set the event target/context

Parameters
Name Type Description
$target null | string | object
Returns
Type Description
\Zend_EventManager_Event
methodpublicstopPropagation(bool $flag = true) : void

Stop further event propagation

Parameters
Name Type Description
$flag bool
Documentation was generated by phpDocumentor 2.0.0a8.