src/DataHandling.php
public static function encodeUri($uri)
    {
        $uri = self::removeSchemeFromUri($uri, $scheme);
        $uri = rawurlencode($uri);

        // Decode slashes
        $uri = str_replace("%2F", "/", $uri);

        return $scheme . $uri;
    }
public static function encodeUri($uri)
    {
        $uri = self::removeSchemeFromUri($uri, $scheme);
        $uri = rawurlencode($uri);

        // Decode slashes
        $uri = str_replace("%2F", "/", $uri);

        return $scheme . $uri;
    }
public static function encodeUri ( $ uri ) { $ uri = self :: removeSchemeFromUri ( $ uri , $ scheme ) ; $ uri = rawurlencode ( $ uri ) ; // Decode slashes $ uri = str_replace ( "%2F" , "/" , $ uri ) ; return $ scheme . $ uri ; }
Encodes a full URI, leaving the slashes and scheme intact.

@param string $uri
@return string
Encodes a full URI leaving the slashes and scheme intact .