コード例 #1
0
 function getInstanceIWish(IConnection $connection)
 {
     $connectionString = (string) $connection;
     foreach ($this->pool as $k => $p) {
         if ((string) $p == $connectionString) {
             unset($this->pool[$k]);
             //echo "Recycled Connection\r\n";
             return $p;
         }
     }
     //echo "New Connection\r\n";
     return $connection->toInstance();
 }
コード例 #2
0
ファイル: Instance.php プロジェクト: splitice/radical-db
 function transactionRollback()
 {
     $result = $this->adapter->rollback();
     $this->transactionManager->inTransaction = false;
     if (!$result) {
         throw new TransactionException("Transaction ROLLBACK failed");
     }
     $this->transactionManager->handleOnRollback();
     $this->transactionManager->clearAfterCommitOrRollback();
 }