Exemplo n.º 1
0
 function rollBack()
 {
     $this->_transaction_depth--;
     if ($this->shouldEmulateNesting()) {
         return;
     }
     return parent::rollBack();
 }
Exemplo n.º 2
0
 /**
  * Rollback DB transaction
  *
  * @return $this
  * @throws \Exception
  */
 public function rollBack()
 {
     if ($this->_transactionLevel === 1) {
         $this->_debugTimer();
         parent::rollBack();
         $this->_isRolledBack = false;
         $this->_debugStat(self::DEBUG_TRANSACTION, 'ROLLBACK');
     } elseif ($this->_transactionLevel === 0) {
         throw new \Exception(AdapterInterface::ERROR_ASYMMETRIC_ROLLBACK_MESSAGE);
     } else {
         $this->_isRolledBack = true;
     }
     --$this->_transactionLevel;
     return $this;
 }