Files
piratepoet/lib/Models/Model.php
2015-08-13 18:04:28 +02:00

19 lines
392 B
PHP

<?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();
}
}