Commit c8e5c3e4 authored by pookey's avatar pookey

pookey: fixes #92

parent 0ad201e5
......@@ -12,7 +12,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
* @param Doctrine_EventListener $listener
* @return void
*/
public function add(Doctrine_EventListener $listener) {
public function addListener(Doctrine_EventListener $listener) {
$this->listeners[] = $listener;
}
/**
......@@ -22,7 +22,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
* @param mixed $key
* @return mixed
*/
public function get($key) {
public function getListener($key) {
if( ! isset($this->listeners[$key]))
return null;
......@@ -35,7 +35,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
* @param Doctrine_EventListener $listener
* @return void
*/
public function set($key, Doctrine_EventListener $listener) {
public function setListener($key, Doctrine_EventListener $listener) {
$this->listeners[$key] = $listener;
}
......@@ -97,13 +97,15 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
public function onGetProperty(Doctrine_Record $record, $property, $value) {
foreach($this->listeners as $listener) {
$listener->onGetProperty($record, $property, $value);
$value = $listener->onGetProperty($record, $property, $value);
}
return $value;
}
public function onSetProperty(Doctrine_Record $record, $property, $value) {
foreach($this->listeners as $listener) {
$listener->onSetProperty($record, $property, $value);
$value = $listener->onSetProperty($record, $property, $value);
}
return $value;
}
public function onInsert(Doctrine_Record $record) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment