Source for file Chain.php
Documentation is available at Chain.php
* $Id: Chain.php 2186 2007-08-09 22:16:33Z jackbravo $
* 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_Chain
* this class represents a chain of different listeners,
* useful for having multiple listeners listening the events at the same time
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @version $Revision: 2186 $
* @var array $listeners an array containing all listeners
* adds a listener to the chain of listeners
* @param object $listener
public function add($listener, $name =
null)
throw
new Doctrine_EventListener_Exception("Couldn't add eventlistener. EventListeners should implement either Doctrine_EventListener_Interface or Doctrine_Overloadable");
* returns a Doctrine_EventListener on success
public function get($key)
* @param Doctrine_EventListener $listener
public function set($key, Doctrine_EventListener $listener)
* an event invoked when Doctrine_Record is being loaded from database
* @param Doctrine_Record $record
public function onLoad(Doctrine_Record $record)
$listener->onLoad($record);
* an event invoked when Doctrine_Record is being loaded
* from database but not yet initialized
* @param Doctrine_Record $record
public function onPreLoad(Doctrine_Record $record)
$listener->onPreLoad($record);
* an event invoked when Doctrine_Record is serialized
* @param Doctrine_Record $record
public function onSleep(Doctrine_Record $record)
$listener->onSleep($record);
* an event invoked when Doctrine_Record is unserialized
* @param Doctrine_Record $record
public function onWakeUp(Doctrine_Record $record)
$listener->onWakeUp($record);
* an event invoked after Doctrine_Connection is closed
* @param Doctrine_Event $event
public function postClose(Doctrine_Event $event)
$listener->postClose($event);
* an event invoked before Doctrine_Connection is closed
* @param Doctrine_Event $event
public function preClose(Doctrine_Event $event)
$listener->preClose($event);
* an event invoked after Doctrine_Connection is opened
* @param Doctrine_Connection $connection
public function onOpen(Doctrine_Connection $connection)
$listener->onOpen($connection);
* an event invoked after a Doctrine_Connection transaction is committed
* @param Doctrine_Event $event
$listener->postTransactionCommit($event);
* an event invoked before a Doctrine_Connection transaction is committed
* @param Doctrine_Event $event
$listener->preTransactionCommit($event);
* an event invoked after a Doctrine_Connection transaction is being rolled back
* @param Doctrine_Event $event
$listener->postTransactionRollback($event);
* onPreTransactionRollback
* an event invoked before a Doctrine_Connection transaction is being rolled back
* @param Doctrine_Event $event
$listener->preTransactionRollback($event);
* an event invoked after a Doctrine_Connection transaction has been started
* @param Doctrine_Event $event
$listener->postTransactionBegin($event);
* an event invoked before a Doctrine_Connection transaction is being started
* @param Doctrine_Event $event
$listener->preTransactionBegin($event);
* an event invoked after a Doctrine_Collection is being deleted
* @param Doctrine_Collection $collection
$listener->onCollectionDelete($collection);
* an event invoked after a Doctrine_Collection is being deleted
* @param Doctrine_Collection $collection
$listener->onPreCollectionDelete($collection);
$listener->postConnect($event);
$listener->preConnect($event);
public function preQuery(Doctrine_Event $event)
$listener->preQuery($event);
public function postQuery(Doctrine_Event $event)
$listener->postQuery($event);
$listener->prePrepare($event);
$listener->postPrepare($event);
public function preExec(Doctrine_Event $event)
$listener->preExec($event);
public function postExec(Doctrine_Event $event)
$listener->postExec($event);
public function preError(Doctrine_Event $event)
$listener->preError($event);
public function postError(Doctrine_Event $event)
$listener->postError($event);
public function preFetch(Doctrine_Event $event)
$listener->preFetch($event);
public function postFetch(Doctrine_Event $event)
$listener->postFetch($event);
$listener->preFetchAll($event);
$listener->postFetchAll($event);
$listener->preStmtExecute($event);
$listener->postStmtExecute($event);