public static function create($closure, $execute=true)
    {
        $transaction = new self();
        $transaction->callback($closure);

        if($execute)
            $transaction->execute();

        return $transaction;
    }
public static function create($closure, $execute=true)
    {
        $transaction = new self();
        $transaction->callback($closure);

        if($execute)
            $transaction->execute();

        return $transaction;
    }
public static function create ( $ closure , $ execute = true ) { $ transaction = new self ( ) ; $ transaction -> callback ( $ closure ) ; if ( $ execute ) $ transaction -> execute ( ) ; return $ transaction ; }
Creates a transaction and optionally execute a transaction
@return Transaction
Creates a transaction and optionally execute a transaction