Files
piratepoet/lib/Models/Setting.php
Vlad c5f67cb371 - Database cleanup uses Models
- Formatted code as per Marco's comments
2015-08-12 22:48:42 +00:00

25 lines
566 B
PHP

<?php
namespace MailPoet\Models;
if (!defined('ABSPATH')) exit;
class Setting extends Model {
public static $_table = MP_SETTINGS_TABLE;
function __construct() {
parent::__construct();
$this->addValidations("name", array(
"required" => "name_is_blank",
"isString" => "name_is_not_string",
"minLength|2" => "name_is_short"
));
$this->addValidations("value", array(
"required" => "value_is_blank",
"isString" => "value_is_not_string",
"minLength|2" => "value_is_short"
));
}
}