public function rollback()
    {
        $context = $this->_context;

        if ($context->transaction_level > 0) {
            $this->logger->info('transaction rollback', 'db.transaction.rollback');
            $context->transaction_level--;

            if ($context->transaction_level === 0) {
                $this->eventsManager->fireEvent('db:rollbackTransaction', $this);

                try {
                    if (!$context->connection->rollBack()) {
                        throw new DbException('rollBack failed.');
                    }
                } catch (\PDOException $exception) {
                    throw new DbException('rollBack failed: ' . $exception->getMessage(), $exception->getCode(), $exception);
                } finally {
                    $this->poolManager->push($this, $context->connection);
                    $context->connection = null;
                }
            }
        }
    }
public function rollback()
    {
        $context = $this->_context;

        if ($context->transaction_level > 0) {
            $this->logger->info('transaction rollback', 'db.transaction.rollback');
            $context->transaction_level--;

            if ($context->transaction_level === 0) {
                $this->eventsManager->fireEvent('db:rollbackTransaction', $this);

                try {
                    if (!$context->connection->rollBack()) {
                        throw new DbException('rollBack failed.');
                    }
                } catch (\PDOException $exception) {
                    throw new DbException('rollBack failed: ' . $exception->getMessage(), $exception->getCode(), $exception);
                } finally {
                    $this->poolManager->push($this, $context->connection);
                    $context->connection = null;
                }
            }
        }
    }
public function rollback ( ) { $ context = $ this -> _context ; if ( $ context -> transaction_level > 0 ) { $ this -> logger -> info ( 'transaction rollback' , 'db.transaction.rollback' ) ; $ context -> transaction_level -- ; if ( $ context -> transaction_level === 0 ) { $ this -> eventsManager -> fireEvent ( 'db:rollbackTransaction' , $ this ) ; try { if ( ! $ context -> connection -> rollBack ( ) ) { throw new DbException ( 'rollBack failed.' ) ; } } catch ( \ PDOException $ exception ) { throw new DbException ( 'rollBack failed: ' . $ exception -> getMessage ( ) , $ exception -> getCode ( ) , $ exception ) ; } finally { $ this -> poolManager -> push ( $ this , $ context -> connection ) ; $ context -> connection = null ; } } } }
Rollbacks the active transaction in the connection

@return void
@throws \ManaPHP\Db\Exception
Rollbacks the active transaction in the connection