* @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();
}
/**