1
0
mirror of synced 2024-12-13 14:56:01 +03:00

fixes #92 (and first test of post-commit script...)

This commit is contained in:
pookey 2006-09-21 14:38:50 +00:00
parent c8e5c3e4e3
commit 2ff5d01f7d

View File

@ -44,6 +44,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
$listener->onLoad($record); $listener->onLoad($record);
} }
} }
public function onPreLoad(Doctrine_Record $record) { public function onPreLoad(Doctrine_Record $record) {
foreach($this->listeners as $listener) { foreach($this->listeners as $listener) {
$listener->onPreLoad($record); $listener->onPreLoad($record);
@ -67,6 +68,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
$listener->onUpdate($record); $listener->onUpdate($record);
} }
} }
public function onPreUpdate(Doctrine_Record $record) { public function onPreUpdate(Doctrine_Record $record) {
foreach($this->listeners as $listener) { foreach($this->listeners as $listener) {
$listener->onPreUpdate($record); $listener->onPreUpdate($record);
@ -78,6 +80,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
$listener->onCreate($record); $listener->onCreate($record);
} }
} }
public function onPreCreate(Doctrine_Record $record) { public function onPreCreate(Doctrine_Record $record) {
foreach($this->listeners as $listener) { foreach($this->listeners as $listener) {
$listener->onPreCreate($record); $listener->onPreCreate($record);
@ -89,6 +92,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
$listener->onSave($record); $listener->onSave($record);
} }
} }
public function onPreSave(Doctrine_Record $record) { public function onPreSave(Doctrine_Record $record) {
foreach($this->listeners as $listener) { foreach($this->listeners as $listener) {
$listener->onPreSave($record); $listener->onPreSave($record);
@ -101,6 +105,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
} }
return $value; return $value;
} }
public function onSetProperty(Doctrine_Record $record, $property, $value) { public function onSetProperty(Doctrine_Record $record, $property, $value) {
foreach($this->listeners as $listener) { foreach($this->listeners as $listener) {
$value = $listener->onSetProperty($record, $property, $value); $value = $listener->onSetProperty($record, $property, $value);
@ -113,6 +118,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
$listener->onInsert($record); $listener->onInsert($record);
} }
} }
public function onPreInsert(Doctrine_Record $record) { public function onPreInsert(Doctrine_Record $record) {
foreach($this->listeners as $listener) { foreach($this->listeners as $listener) {
$listener->onPreInsert($record); $listener->onPreInsert($record);
@ -124,6 +130,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
$listener->onDelete($record); $listener->onDelete($record);
} }
} }
public function onPreDelete(Doctrine_Record $record) { public function onPreDelete(Doctrine_Record $record) {
foreach($this->listeners as $listener) { foreach($this->listeners as $listener) {
$listener->onPreDelete($record); $listener->onPreDelete($record);
@ -135,6 +142,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
$listener->onEvict($record); $listener->onEvict($record);
} }
} }
public function onPreEvict(Doctrine_Record $record) { public function onPreEvict(Doctrine_Record $record) {
foreach($this->listeners as $listener) { foreach($this->listeners as $listener) {
$listener->onPreEvict($record); $listener->onPreEvict($record);
@ -168,6 +176,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
$listener->onClose($connection); $listener->onClose($connection);
} }
} }
public function onPreClose(Doctrine_Connection $connection) { public function onPreClose(Doctrine_Connection $connection) {
foreach($this->listeners as $listener) { foreach($this->listeners as $listener) {
$listener->onPreClose($connection); $listener->onPreClose($connection);
@ -185,6 +194,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
$listener->onTransactionCommit($connection); $listener->onTransactionCommit($connection);
} }
} }
public function onPreTransactionCommit(Doctrine_Connection $connection) { public function onPreTransactionCommit(Doctrine_Connection $connection) {
foreach($this->listeners as $listener) { foreach($this->listeners as $listener) {
$listener->onPreTransactionCommit($connection); $listener->onPreTransactionCommit($connection);
@ -196,6 +206,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
$listener->onTransactionRollback($connection); $listener->onTransactionRollback($connection);
} }
} }
public function onPreTransactionRollback(Doctrine_Connection $connection) { public function onPreTransactionRollback(Doctrine_Connection $connection) {
foreach($this->listeners as $listener) { foreach($this->listeners as $listener) {
$listener->onPreTransactionRollback($connection); $listener->onPreTransactionRollback($connection);
@ -207,6 +218,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
$listener->onTransactionBegin($connection); $listener->onTransactionBegin($connection);
} }
} }
public function onPreTransactionBegin(Doctrine_Connection $connection) { public function onPreTransactionBegin(Doctrine_Connection $connection) {
foreach($this->listeners as $listener) { foreach($this->listeners as $listener) {
$listener->onPreTransactionBegin($connection); $listener->onPreTransactionBegin($connection);