X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=application%2Fship-simu%2Fmain%2Fuser%2Fextended%2Fclass_ShipSimuMember.php;h=a44718c393345b6146ba0bc85ff8e8dac76d88dd;hp=25e76b7bbe54f7e861f30d11152f5b55d181501f;hb=ec23e72b16433ac136817f3ea78697fb70236e4a;hpb=e2846002167edccccb1240437f40ee057075d0d9 diff --git a/application/ship-simu/main/user/extended/class_ShipSimuMember.php b/application/ship-simu/main/user/extended/class_ShipSimuMember.php index 25e76b7..a44718c 100644 --- a/application/ship-simu/main/user/extended/class_ShipSimuMember.php +++ b/application/ship-simu/main/user/extended/class_ShipSimuMember.php @@ -28,18 +28,22 @@ class ShipSimuMember extends ShipSimuBaseUser implements ManageableMember { * @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); + } - // 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(); } /**