hasProperty("date")){ $this->date = new MongoDate(); } } public function getCode(){ return $this->id; } public static function getCollectionName(){ return "guiLog"; } public static function fromException(Exception $ex){ $tmp = new stdClass(); $tmp->message = $ex->getMessage(); $tmp->trace = strval($ex); return new self($tmp); } } ?>