1
0
mirror of synced 2024-12-13 06:46:03 +03:00

Removed deprecated events, fixes #97

This commit is contained in:
zYne 2006-09-21 17:14:20 +00:00
parent 270bf92273
commit a25913ab7a
3 changed files with 41 additions and 42 deletions

View File

@ -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) { }

View File

@ -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);

View File

@ -1,7 +1,33 @@
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
/**
* 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);