diff --git a/Doctrine/EventListener.php b/Doctrine/EventListener.php index f9e23dce1..22341fa38 100644 --- a/Doctrine/EventListener.php +++ b/Doctrine/EventListener.php @@ -28,8 +28,6 @@ Doctrine::autoload('Doctrine_EventListener_Interface'); * @package Doctrine ORM * @url www.phpdoctrine.com * @license LGPL - * @version 1.0 alpha - * */ abstract class Doctrine_EventListener implements Doctrine_EventListener_Interface { @@ -65,12 +63,6 @@ abstract class Doctrine_EventListener implements Doctrine_EventListener_Interfac public function onEvict(Doctrine_Record $record) { } public function onPreEvict(Doctrine_Record $record) { } - public function onSaveCascade(Doctrine_Record $record) { } - public function onPreSaveCascade(Doctrine_Record $record) { } - - public function onDeleteCascade(Doctrine_Record $record) { } - public function onPreDeleteCascade(Doctrine_Record $record) { } - public function onClose(Doctrine_Connection $connection) { } public function onPreClose(Doctrine_Connection $connection) { } diff --git a/Doctrine/EventListener/Chain.php b/Doctrine/EventListener/Chain.php index 49317b2fc..a5c7b4a37 100644 --- a/Doctrine/EventListener/Chain.php +++ b/Doctrine/EventListener/Chain.php @@ -238,43 +238,30 @@ class Doctrine_EventListener_Chain extends Doctrine_Access { $listener->onPreDelete($record); } } - + /** + * onEvict + * an event invoked after Doctrine_Record is evicted from record repository + * + * @param Doctrine_Record $record + * @return void + */ public function onEvict(Doctrine_Record $record) { foreach($this->listeners as $listener) { $listener->onEvict($record); } } - + /** + * onPreEvict + * an event invoked before Doctrine_Record is evicted from record repository + * + * @param Doctrine_Record $record + * @return void + */ public function onPreEvict(Doctrine_Record $record) { foreach($this->listeners as $listener) { $listener->onPreEvict($record); } } - - public function onSaveCascade(Doctrine_Record $record) { - foreach($this->listeners as $listener) { - $listener->onSaveCascade($record); - } - } - - public function onPreSaveCascade(Doctrine_Record $record) { - foreach($this->listeners as $listener) { - $listener->onPreSaveCascade($record); - } - } - - public function onDeleteCascade(Doctrine_Record $record) { - foreach($this->listeners as $listener) { - $listener->onDeleteCascade($record); - } - } - - public function onPreDeleteCascade(Doctrine_Record $record) { - foreach($this->listeners as $listener) { - $listener->onPreDeleteCascade($record); - } - } - public function onClose(Doctrine_Connection $connection) { foreach($this->listeners as $listener) { $listener->onClose($connection); diff --git a/Doctrine/EventListener/Interface.php b/Doctrine/EventListener/Interface.php index 1aaad9510..b9920bae3 100644 --- a/Doctrine/EventListener/Interface.php +++ b/Doctrine/EventListener/Interface.php @@ -1,7 +1,33 @@ . + */ /** - * interface for event listening, forces all classes that extend + * Doctrine_EventListener_Interface + * + * interface for event listening, forces all classes that extend * Doctrine_EventListener to have the same method arguments as their parent + * + * @author Konsta Vesterinen + * @package Doctrine ORM + * @url www.phpdoctrine.com + * @license LGPL */ interface Doctrine_EventListener_Interface { @@ -28,12 +54,6 @@ interface Doctrine_EventListener_Interface { public function onEvict(Doctrine_Record $record); public function onPreEvict(Doctrine_Record $record); - - public function onSaveCascade(Doctrine_Record $record); - public function onPreSaveCascade(Doctrine_Record $record); - - public function onDeleteCascade(Doctrine_Record $record); - public function onPreDeleteCascade(Doctrine_Record $record); public function onSleep(Doctrine_Record $record);