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

44 lines
806 B
PHP
Raw Permalink Normal View History

<?php
/**
* Created by PhpStorm.
* User: liujin834
* Date: 14/12/13
* Time: 上午11:41
*/
namespace Westdc\Service\ServiceAgent;
use Westdc\Db as WestdcDb;
2015-03-04 06:51:26 +00:00
use Westdc\Db\Record\Decorate as RecordDecorate;
class Db {
public function getZendDb(){
2015-01-24 08:37:09 +00:00
return WestdcDb\Db::getInstance();
}
public function getPdo()
{
return WestdcDb\Pdo::getInstance();
}
public function getDbh()
{
return new WestdcDb\Dbh;
}
public function getRecordHandle()
{
2015-03-04 06:51:26 +00:00
return new WestdcDb\Record\Record;
}
2015-03-21 03:15:44 +00:00
public function getSelectHandle()
{
return new WestdcDb\Record\Select;
}
2015-03-04 06:51:26 +00:00
public function getRecordDecorate($decorateName){
$className = "RecordDecorate\\".$decorateName;
return new $className;
}
}