public static function fromString($url, Url $root = null)
    {
        $instance = new static();
        $components = static::parseUrl($url);
        foreach ($components as $component => $value) {
            $method = 'set' . Inflector::camelize($component);
            call_user_func(array($instance, $method), $value);
        }
        $instance->setOriginal($url);
        $instance->setRoot($root);

        return $instance;
    }