lib/Doctrine/DBAL/Connection.php
public function setAutoCommit($autoCommit)
    {
        $autoCommit = (bool) $autoCommit;

        // Mode not changed, no-op.
        if ($autoCommit === $this->autoCommit) {
            return;
        }

        $this->autoCommit = $autoCommit;

        // Commit all currently active transactions if any when switching auto-commit mode.
        if ($this->isConnected !== true || $this->transactionNestingLevel === 0) {
            return;
        }

        $this->commitAll();
    }
public function setAutoCommit($autoCommit)
    {
        $autoCommit = (bool) $autoCommit;

        // Mode not changed, no-op.
        if ($autoCommit === $this->autoCommit) {
            return;
        }

        $this->autoCommit = $autoCommit;

        // Commit all currently active transactions if any when switching auto-commit mode.
        if ($this->isConnected !== true || $this->transactionNestingLevel === 0) {
            return;
        }

        $this->commitAll();
    }
public function setAutoCommit ( $ autoCommit ) { $ autoCommit = ( bool ) $ autoCommit ; // Mode not changed, no-op. if ( $ autoCommit === $ this -> autoCommit ) { return ; } $ this -> autoCommit = $ autoCommit ; // Commit all currently active transactions if any when switching auto-commit mode. if ( $ this -> isConnected !== true || $ this -> transactionNestingLevel === 0 ) { return ; } $ this -> commitAll ( ) ; }
Sets auto-commit mode for this connection.

If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual
transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either
the method commit or the method rollback. By default, new connections are in auto-commit mode.

NOTE: If this method is called during a transaction and the auto-commit mode is changed, the transaction is
committed. If this method is called and the auto-commit mode is not changed, the call is a no-op.

@see   isAutoCommit

@param bool $autoCommit True to enable auto-commit mode; false to disable it.
Sets auto - commit mode for this connection .