示例#1
0
 /**
  * Used to be able to make a call inside of a transaction
  * @return \Phalcon\Db\AdapterInterface
  */
 public function selectReadConnection()
 {
     $transaction = new Transaction($this->getReadConnectionService());
     if ($transaction->isInTransaction()) {
         return $transaction->getTransaction()->getConnection();
     } else {
         return $this->getReadConnection();
     }
 }