Dao.php 669 Bytes
<?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));
    }
}