public function transform(string $value, string ...$parts): string {
        $value = parse_url($value);

        $toUnset = ['scheme', 'host', 'port', 'user', 'pass', 'path', 'query', 'fragment'];
        $toUnset = array_intersect(array_diff($toUnset, $parts), array_keys($value));

        foreach ($toUnset as $i) {
            unset($value[$i]);
        }

        $scheme   = isset($value['scheme']) ? $value['scheme'] . '://' : '';
        $host     = isset($value['host']) ? $value['host'] : '';
        $port     = isset($value['port']) ? ':' . $value['port'] : '';
        $user     = isset($value['user']) ? $value['user'] : '';
        $pass     = isset($value['pass']) ? ':' . $value['pass'] : '';
        $pass     = ($user || $pass) ? "$pass@" : '';
        $path     = isset($value['path']) ? $value['path'] : '';
        $query    = isset($value['query']) ? '?' . $value['query'] : '';
        $fragment = isset($value['fragment']) ? '#' . $value['fragment'] : '';
        return $scheme . $user . $pass . $host . $port . $path . $query . $fragment;
    }