westdc-core/Westdc/Service/ServiceAgent/Db.php

39 lines
712 B
PHP

<?php
/**
* Created by PhpStorm.
* User: liujin834
* Date: 14/12/13
* Time: 上午11:41
*/
namespace Westdc\Service\ServiceAgent;
use Westdc\Db as WestdcDb;
use Westdc\Db\Record\Decorate as RecordDecorate;
class Db {
public function getZendDb(){
return WestdcDb\Db::getInstance();
}
public function getPdo()
{
return WestdcDb\Pdo::getInstance();
}
public function getDbh()
{
return new WestdcDb\Dbh;
}
public function getRecordHandle()
{
return new WestdcDb\Record\Record;
}
public function getRecordDecorate($decorateName){
$className = "RecordDecorate\\".$decorateName;
return new $className;
}
}