Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Db / TableGateway / Feature / EventFeature / TableGatewayEvent.php
blobaf7531eeffd2a0c6818562f7e90a4ebfb1413443
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Db\TableGateway\Feature\EventFeature;
12 use Zend\Db\TableGateway\AbstractTableGateway;
13 use Zend\EventManager\EventInterface;
15 class TableGatewayEvent implements EventInterface
18 /**
19 * @var AbstractTableGateway
21 protected $target = null;
23 /**
24 * @var null
26 protected $name = null;
28 /**
29 * @var array|\ArrayAccess
31 protected $params = array();
33 /**
34 * Get event name
36 * @return string
38 public function getName()
40 return $this->name;
43 /**
44 * Get target/context from which event was triggered
46 * @return null|string|object
48 public function getTarget()
50 return $this->target;
53 /**
54 * Get parameters passed to the event
56 * @return array|\ArrayAccess
58 public function getParams()
60 return $this->params;
63 /**
64 * Get a single parameter by name
66 * @param string $name
67 * @param mixed $default Default value to return if parameter does not exist
68 * @return mixed
70 public function getParam($name, $default = null)
72 return (isset($this->params[$name]) ? $this->params[$name] : $default);
75 /**
76 * Set the event name
78 * @param string $name
79 * @return void
81 public function setName($name)
83 $this->name = $name;
86 /**
87 * Set the event target/context
89 * @param null|string|object $target
90 * @return void
92 public function setTarget($target)
94 $this->target = $target;
97 /**
98 * Set event parameters
100 * @param string $params
101 * @return void
103 public function setParams($params)
105 $this->params = $params;
109 * Set a single parameter by key
111 * @param string $name
112 * @param mixed $value
113 * @return void
115 public function setParam($name, $value)
117 $this->params[$name] = $value;
121 * Indicate whether or not the parent EventManagerInterface should stop propagating events
123 * @param bool $flag
124 * @return void
126 public function stopPropagation($flag = true)
128 return;
132 * Has this event indicated event propagation should stop?
134 * @return bool
136 public function propagationIsStopped()
138 return false;