Files
fdn2/private/lib/dao/models/LogModel.php
T

36 lines
577 B
PHP

<?php
/*
Author: Riccardo Di Dato
Creation Date: 27/gen/2016
*/
class LogModel extends Model {
public function __construct($saveableObject = null){
parent::__construct($saveableObject);
if (!$this->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);
}
}
?>