public static function replaceBasename($uri, $path)
    {
        $uri = self::filterUri($uri);

        return self::normalizePath($uri, (new HierarchicalPath($uri->getPath()))->withBasename($path));
    }
public static function replaceBasename($uri, $path)
    {
        $uri = self::filterUri($uri);

        return self::normalizePath($uri, (new HierarchicalPath($uri->getPath()))->withBasename($path));
    }
public static function replaceBasename ( $ uri , $ path ) { $ uri = self :: filterUri ( $ uri ) ; return self :: normalizePath ( $ uri , ( new HierarchicalPath ( $ uri -> getPath ( ) ) ) -> withBasename ( $ path ) ) ; }
Replace the URI path basename.

@return Psr7UriInterface|UriInterface
Replace the URI path basename .