getConnection() 공개 정적인 메소드

public static getConnection ( boolean $raw = false, boolean $writeOnly = false ) : Wrapper | Zend_Db_Adapter_Abstract
$raw boolean
$writeOnly boolean
리턴 Pimcore\Db\Wrapper | Zend_Db_Adapter_Abstract
예제 #1
0
파일: MysqlTable.php 프로젝트: sfie/pimcore
 /**
  * @return \Zend_Db_Adapter_Abstract
  */
 protected function getDb()
 {
     if (!$this->db) {
         // we're using a new mysql connection here to avoid problems with active (nested) transactions
         \Logger::debug("Initialize dedicated MySQL connection for the cache adapter");
         $this->db = Db::getConnection();
     }
     return $this->db;
 }
예제 #2
0
파일: Wrapper.php 프로젝트: sfie/pimcore
 /**
  * @return \Zend_Db_Adapter_Abstract
  */
 public function getResource()
 {
     if (!$this->resource) {
         // get the \Zend_Db_Adapter_Abstract not the wrapper
         $this->resource = Db::getConnection(true);
     }
     return $this->resource;
 }
 public function __construct($revision)
 {
     $this->revision = $revision;
     $this->db = \Pimcore\Db::getConnection();
 }