예제 #1
0
 /**
  * Constructor
  *
  * @param \Phinx\Db\Adapter\AdapterInterface $adapter The original adapter to decorate.
  * @param \CoreTyson\Database\Database $connection The connection to actually use.
  */
 public function __construct(AdapterInterface $adapter, Database $connection)
 {
     $this->adapter = $adapter;
     $this->connection = $connection;
     $pdo = $adapter->getConnection();
     $connection->driver()->connection($pdo);
 }
예제 #2
0
파일: CakeAdapter.php 프로젝트: lhas/pep
 /**
  * Gets the database connection
  *
  * @return \PDO
  */
 public function getConnection()
 {
     return $this->adapter->getConnection();
 }