Removed deprecated events, fixes #97
This commit is contained in:
parent
270bf92273
commit
a25913ab7a
@ -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) { }
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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>.
|
||||
*/
|
||||
/**
|
||||
* 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 {
|
||||
|
||||
@ -29,12 +55,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);
|
||||
|
||||
public function onWakeUp(Doctrine_Record $record);
|
||||
|
Loading…
Reference in New Issue
Block a user