Reverted back to Model class

This commit is contained in:
Vlad
2015-08-17 17:37:43 +00:00
parent dd8f704037
commit 3af24f9877
9 changed files with 389 additions and 389 deletions

18
lib/Models/Model.php Normal file
View File

@ -0,0 +1,18 @@
<?php
namespace MailPoet\Models;
if (!defined('ABSPATH')) exit;
class Model extends \Sudzy\ValidModel {
function __construct() {
$customValidators = new CustomValidator();
parent::__construct($customValidators->init());
}
function save() {
if ($this->created_at === null) {
$this->created_at = date("Y-m-d H:i:s");
}
parent::save();
}
}