]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14990 dml: added __destruct method, will be needed for logging
authorskodak <skodak>
Tue, 28 Oct 2008 12:02:13 +0000 (12:02 +0000)
committerskodak <skodak>
Tue, 28 Oct 2008 12:02:13 +0000 (12:02 +0000)
lib/dml/moodle_database.php

index b569c196ceebbdad8bbb4da4207ca96ea2248d20..36d8547b36247a18d0af3762a83cf05cf1a61190 100644 (file)
@@ -69,6 +69,13 @@ abstract class moodle_database {
         $this->external  = $external;
     }
 
+    /**
+     * Destructor - cleans up and flushes everything needed.
+     */
+    public function __desctruct() {
+        $this->dispose();
+    }
+
     /**
      * Detects if all needed PHP stuff installed.
      * Note: can be used before connect()
@@ -218,7 +225,7 @@ abstract class moodle_database {
             $this->database_manager->dispose();
             $this->database_manager = null;
         }
-        $this->columns   = array();
+        $this->columns = array();
     }
 
     /**