Example #1
0
 public function __construct()
 {
     parent::__construct();
     self::$_table = 'product';
     self::$field = array('name', 'description', 'price', 'activate', 'createdTime', 'updatedTime');
     $this->validate = new Validate_Library(self::$rules);
 }
Example #2
0
 public function __construct()
 {
     parent::__construct();
     self::$_table = 'user';
     self::$field = array('name', 'password', 'email', 'avatar', 'activate', 'createdTime', 'updatedTime');
     $this->validate = new Validate_Library(self::$rules);
 }
Example #3
0
 public function __construct()
 {
     self::$_table;
     try {
         self::$pdo = new PDO('mysql:host=' . DB_HOST . ';' . 'dbname=' . DB_DATABASE, DB_USER, DB_PASSWORD);
     } catch (PDOException $e) {
         echo 'Connect failed :' . $e->getMessage();
     }
     $this->library = new FT_Library_Loader();
     $this->library->load('validate');
 }