X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fuser%2Fmember%2Fclass_Member.php;h=9fd68192a175a8db01db59da7a608a82777423eb;hb=e2085bcbe91929325896d4943b085b16325d3201;hp=b67ad88b9274bbc1f2ebc48759a49ab2ac47663f;hpb=c6d73b0e3246efc824cb98338d4be7ee5bc9f308;p=core.git diff --git a/inc/classes/main/user/member/class_Member.php b/inc/classes/main/user/member/class_Member.php index b67ad88b..9fd68192 100644 --- a/inc/classes/main/user/member/class_Member.php +++ b/inc/classes/main/user/member/class_Member.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -32,19 +32,6 @@ class Member extends BaseUser implements ManageableMember, Registerable, Updatea parent::__construct(__CLASS__); } - /** - * Destructor to always flush updates - * - * @return void - */ - public function __destruct () { - // Flush any updated entries to the database - $this->flushPendingUpdates(); - - // Call parent destructor - parent::__destruct(); - } - /** * Creates an instance of this user class by a provided username. This * factory method will check if username is already taken and if not so it @@ -150,25 +137,12 @@ class Member extends BaseUser implements ManageableMember, Registerable, Updatea // Add the search criteria for searching for the right entry $updateInstance->setSearchInstance($searchInstance); + // Set wrapper class name + $updateInstance->setWrapperConfigEntry('user_db_wrapper_class'); + // Remember the update in database result $this->getResultInstance()->add2UpdateQueue($updateInstance); } - - /** - * Flushs all pending updates to the database layer - * - * @return void - */ - public function flushPendingUpdates () { - // Do we have data to update? - if ($this->getResultInstance()->ifDataNeedsFlush()) { - // Get a database wrapper - $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_db_wrapper_class'); - - // Yes, then send the whole result to the database layer - $wrapperInstance->doUpdateByResult($this->getResultInstance()); - } // END - if - } } // [EOF]