function rollBack() { $this->_transaction_depth--; if ($this->shouldEmulateNesting()) { return; } return parent::rollBack(); }
/** * 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; }