44 lines
806 B
PHP
44 lines
806 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 getSelectHandle()
|
|
{
|
|
return new WestdcDb\Record\Select;
|
|
}
|
|
|
|
public function getRecordDecorate($decorateName){
|
|
$className = "RecordDecorate\\".$decorateName;
|
|
return new $className;
|
|
}
|
|
}
|