]> git.mxchange.org Git - shipsimu.git/blobdiff - application/ship-simu/main/user/extended/class_ShipSimuMember.php
generateUniqueId() and more useless/deprecated methods removed, code speed-up, link...
[shipsimu.git] / application / ship-simu / main / user / extended / class_ShipSimuMember.php
index 25e76b7bbe54f7e861f30d11152f5b55d181501f..a44718c393345b6146ba0bc85ff8e8dac76d88dd 100644 (file)
@@ -28,18 +28,22 @@ class ShipSimuMember extends ShipSimuBaseUser implements ManageableMember {
         * @param       $className      Name of the class
         * @return      void
         */
         * @param       $className      Name of the class
         * @return      void
         */
-       protected function __construct ($className = "") {
-               // Is the class name empty? Then this is not a specialized user class
-               if (empty($className)) $className = __CLASS__;
-
+       protected function __construct ($className = __CLASS__) {
                // Call parent constructor
                parent::__construct($className);
                // Call parent constructor
                parent::__construct($className);
+       }
 
 
-               // Set part description
-               $this->setObjectDescription("Special member class for Ship-Simu");
+       /**
+        * Destructor for e.g. flushing pending updates to the database
+        *
+        * @return      void
+        */
+       public function __destruct () {
+               // Flush any updated entries to the database
+               $this->flushPendingUpdates();
 
 
-               // Create unique ID number
-               $this->generateUniqueId();
+               // Call parent destructor
+               parent::__destruct();
        }
 
        /**
        }
 
        /**