Dao.php
669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
abstract class YHMBrand_Dao
{
/**
*
* 数据对象
* @var Q_Db_Adapter_Pdo_Mysql
*/
protected $dao = array();
/**
*
* 过期时间
* @var Integer
*/
protected $expire = 300;
/**
* 路由
*
* @var String
*/
protected $router = NULL;
/**
*
* 得到数据存储对象
*
* @param false|string $db
* @return Q_Db_Adapter_Pdo_FastSqlMap
*/
protected function dao()
{
$sqlMapPath = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'SqlMap';
return Q_Db::fastPdo($this->router, array('configPath' => $sqlMapPath));
}
}