示例#1
0
文件: Model.php 项目: rocknoon/wf
 /**
  * 构造函数
  */
 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
文件: Imple.php 项目: rocknoon/wf
 private function _getUserByName($username)
 {
     $username = $this->_model->escape($username);
     //Todo model 应该有一个 fetchOne
     return $this->_model->fetch("where username = {$username}");
 }