Пример #1
0
 /**
  * 构造函数
  */
 private function __construct($table)
 {
     if (!isset($table)) {
         throw new Exception("you need to specify the table name for this DB model");
     }
     if (self::$_db === null) {
         self::$_db = WF_Com_Db_PDO::Instance();
     }
     $this->table = $table;
 }
Пример #2
0
 private function _getUserByName($username)
 {
     $username = $this->_model->escape($username);
     //Todo model 应该有一个 fetchOne
     return $this->_model->fetch("where username = {$username}");
 }