diff --git a/composer.json b/composer.json index 25ea5da..be2220d 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,8 @@ "minimum-stability": "stable", "require": { "php": "^7.4 || ^8.0", - "jrosset/collections": "^2.3 || ^3.0", - "guzzlehttp/psr7": "^2.4" + "jrosset/collections": "^2.3 || ^3.5", + "guzzlehttp/psr7": "^2.6" }, "autoload": { "psr-4": { diff --git a/src/UrlInfo/UrlInfo.php b/src/UrlInfo/UrlInfo.php index 78fa83f..9fdf045 100644 --- a/src/UrlInfo/UrlInfo.php +++ b/src/UrlInfo/UrlInfo.php @@ -1,4 +1,5 @@ setProtocol(); + $this->setHost(); + $this->setUser(); + $this->setPass(); + return $this; + } + /** + * Keep only the “domain” parts of the URL and clear path, arguments and anchor + * + * @return $this + */ + public function keepDomainOnly (): self { + $this->setPath(); + $this->setArguments(); + $this->setAnchor(); + return $this; + } + /** * Is the URL protocol set ? *