public static function current(Request $request = null) {
        if ($request !== null) {
            $bak = self::$current;
            self::$current = $request;
            return $bak;
        }
        return self::$current;
    }
public static function current(Request $request = null) {
        if ($request !== null) {
            $bak = self::$current;
            self::$current = $request;
            return $bak;
        }
        return self::$current;
    }
public static function current ( Request $ request = null ) { if ( $ request !== null ) { $ bak = self :: $ current ; self :: $ current = $ request ; return $ bak ; } return self :: $ current ; }
Gets or sets the current request.

@param Request $request Pass a request object to set the current request.
@return Request Returns the current request if {@link Request} is null or the previous request otherwise.
Gets or sets the current request .