public static function startTransaction(callable $callback = null)
    {
        static::verifyConnection();

        if (!static::$adapter->getConnection()->inTransaction()) {
            static::$adapter->getConnection()->beginTransaction();
        }

        if (is_callable($callback)) {
            try {
                call_user_func_array($callback, []);

                static::commit();
            } catch (DatabaseException $e) {
                static::rollback();
            }
        }
    }
public static function startTransaction(callable $callback = null)
    {
        static::verifyConnection();

        if (!static::$adapter->getConnection()->inTransaction()) {
            static::$adapter->getConnection()->beginTransaction();
        }

        if (is_callable($callback)) {
            try {
                call_user_func_array($callback, []);

                static::commit();
            } catch (DatabaseException $e) {
                static::rollback();
            }
        }
    }
public static function startTransaction ( callable $ callback = null ) { static :: verifyConnection ( ) ; if ( ! static :: $ adapter -> getConnection ( ) -> inTransaction ( ) ) { static :: $ adapter -> getConnection ( ) -> beginTransaction ( ) ; } if ( is_callable ( $ callback ) ) { try { call_user_func_array ( $ callback , [ ] ) ; static :: commit ( ) ; } catch ( DatabaseException $ e ) { static :: rollback ( ) ; } } }
Starting the start of a transaction

@param callable $callback
Starting the start of a transaction