From 270bf9227338e0fc992f4c64afb792268c4e2c56 Mon Sep 17 00:00:00 2001
From: zYne <zYne@625475ce-881a-0410-a577-b389adb331d8>
Date: Thu, 21 Sep 2006 17:07:05 +0000
Subject: [PATCH] added some doc blocks

---
 Doctrine/EventListener/Chain.php | 134 +++++++++++++++++++++++++++----
 1 file changed, 118 insertions(+), 16 deletions(-)

diff --git a/Doctrine/EventListener/Chain.php b/Doctrine/EventListener/Chain.php
index 821cbc1c2..49317b2fc 100644
--- a/Doctrine/EventListener/Chain.php
+++ b/Doctrine/EventListener/Chain.php
@@ -38,99 +38,201 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
     public function set($key, Doctrine_EventListener $listener) {
         $this->listeners[$key] = $listener;
     }
-
+    /**
+     * onLoad
+     * an event invoked when Doctrine_Record is being loaded from database
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onLoad(Doctrine_Record $record) { 
         foreach($this->listeners as $listener) {
             $listener->onLoad($record);
         }
     }
-
+    /**
+     * onPreLoad
+     * an event invoked when Doctrine_Record is being loaded
+     * from database but not yet initialized
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onPreLoad(Doctrine_Record $record) { 
         foreach($this->listeners as $listener) {
             $listener->onPreLoad($record);
         }
     }
-
+    /**
+     * onSleep
+     * an event invoked when Doctrine_Record is serialized
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onSleep(Doctrine_Record $record) { 
         foreach($this->listeners as $listener) {
             $listener->onSleep($record);
         }
     }
-
+    /**
+     * onWakeUp
+     * an event invoked when Doctrine_Record is unserialized
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onWakeUp(Doctrine_Record $record) { 
         foreach($this->listeners as $listener) {
             $listener->onWakeUp($record);
         }
     }
-
+    /**
+     * onUpdate
+     * an event invoked after Doctrine_Record is updated
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onUpdate(Doctrine_Record $record) { 
         foreach($this->listeners as $listener) {
             $listener->onUpdate($record);
         }
     }
-
+    /**
+     * onPreUpdate
+     * an event invoked before Doctrine_Record is updated
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onPreUpdate(Doctrine_Record $record) { 
         foreach($this->listeners as $listener) {
             $listener->onPreUpdate($record);
         }
     }
-
+    /**
+     * onCreate
+     * an event invoked when a new Doctrine_Record is created
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onCreate(Doctrine_Record $record) { 
         foreach($this->listeners as $listener) {
             $listener->onCreate($record);
         }
     }
-
+    /**
+     * onPreCreate
+     * an event invoked when a new Doctrine_Record
+     * but not yet initialized
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onPreCreate(Doctrine_Record $record) { 
         foreach($this->listeners as $listener) {
             $listener->onPreCreate($record);
         }
     }
-
+    /**
+     * onSave
+     * an event invoked after a Doctrine_Record is saved (inserted / updated)
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onSave(Doctrine_Record $record) { 
         foreach($this->listeners as $listener) {
             $listener->onSave($record);
         }
     }
-
+    /**
+     * onSave
+     * an event invoked after a Doctrine_Record is saved (inserted / updated)
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onPreSave(Doctrine_Record $record) { 
         foreach($this->listeners as $listener) {
             $listener->onPreSave($record);
         }
     }
-
+    /**
+     * onGetProperty
+     * an event invoked when a property of Doctrine_Record is retrieved
+     *
+     * @param Doctrine_Record $record
+     * @param string $property
+     * @param mixed $value
+     * @return void
+     */
     public function onGetProperty(Doctrine_Record $record, $property, $value) {
         foreach($this->listeners as $listener) {
             $value = $listener->onGetProperty($record, $property, $value);
         }
         return $value;
     }
-
+    /**
+     * onSetProperty
+     * an event invoked when a property of Doctrine_Record is being set
+     *
+     * @param Doctrine_Record $record
+     * @param string $property
+     * @param mixed $value
+     * @return void
+     */
     public function onSetProperty(Doctrine_Record $record, $property, $value) {
         foreach($this->listeners as $listener) {
             $value = $listener->onSetProperty($record, $property, $value);
         }
         return $value;
     }
-
+    /**
+     * onInsert
+     * an event invoked after Doctrine_Record is inserted into database
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onInsert(Doctrine_Record $record) { 
         foreach($this->listeners as $listener) {
             $listener->onInsert($record);
         }
     }
-
+    /**
+     * onPreInsert
+     * an event invoked before Doctrine_Record is inserted into database
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onPreInsert(Doctrine_Record $record) {
         foreach($this->listeners as $listener) {
             $listener->onPreInsert($record);
         }
     }
-
+    /**
+     * onDelete
+     * an event invoked after Doctrine_Record is deleted from database
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onDelete(Doctrine_Record $record) { 
         foreach($this->listeners as $listener) {
             $listener->onDelete($record);
         }
     }
-
+    /**
+     * onPreDelete
+     * an event invoked before Doctrine_Record is deleted from database
+     *
+     * @param Doctrine_Record $record
+     * @return void
+     */
     public function onPreDelete(Doctrine_Record $record) { 
         foreach($this->listeners as $listener) {
             $listener->onPreDelete($record);