2014-12-13 04:02:01 +00:00
|
|
|
<?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;
|
2014-12-13 04:02:01 +00:00
|
|
|
|
|
|
|
class Db {
|
|
|
|
|
|
|
|
public function getZendDb(){
|
2015-01-24 08:37:09 +00:00
|
|
|
return WestdcDb\Db::getInstance();
|
2014-12-13 04:02:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getPdo()
|
|
|
|
{
|
2015-01-23 08:19:03 +00:00
|
|
|
return WestdcDb\Pdo::getInstance();
|
2014-12-13 04:02:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getDbh()
|
|
|
|
{
|
|
|
|
return new WestdcDb\Dbh;
|
|
|
|
}
|
|
|
|
|
2015-02-16 08:04:47 +00:00
|
|
|
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;
|
2015-02-16 08:04:47 +00:00
|
|
|
}
|
2014-12-13 04:02:01 +00:00
|
|
|
}
|