/** * Called before the StateObject is serialized * * @access protected * @return boolean */ protected function preSerialize() { parent::preSerialize(); if ($this->changed === true && $this->synckeyChanged) { $this->lastsynctime = time(); } return true; }