__toString(). * * @return string a nicely formatted string representation of this object */ public function __toString() { return $this->Name; } public function UpdateLoginState() { $objDatabase = Account::GetDatabase(); $online = $this->blnOnline; $lastlogin = $this->LastLogin; $logincount = $this->LoginCount; $id = $this->intId; $q = "UPDATE `account` SET `online` = '$online', `last_login` = '$lastlogin', `login_count` = '$logincount' WHERE `id` = '$id';"; $objDatabase->NonQuery($q); $this->__blnRestored = true; // $this->Reload(); } public function __get($strName) { switch ($strName) { case 'Name': return $this->Person->FirstName . ' ' . $this->Person->LastName; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } } public function __set($strName, $mixValue) { switch ($strName) { case 'LastLogin': try { return ($this->strLastLogin = QType::Cast($mixValue, QType::String)); } catch (QInvalidCastException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'RegistrationDate': try { return ($this->strLastLogin = QType::Cast($mixValue, QType::String)); } catch (QInvalidCastException $objExc) { $objExc->IncrementOffset(); throw $objExc; } default: try { return (parent::__set($strName, $mixValue)); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } } } ?>