From ecbb0825e0059f4b556012b08a905da0989d5deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Thu, 1 Apr 2021 03:14:22 +0200 Subject: [PATCH] Added include param parameter to Url::getAbsoluteUrl method. --- src/Pecee/Http/Url.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Pecee/Http/Url.php b/src/Pecee/Http/Url.php index bd767a7..08dc50d 100644 --- a/src/Pecee/Http/Url.php +++ b/src/Pecee/Http/Url.php @@ -447,9 +447,10 @@ class Url implements JsonSerializable /** * Returns the absolute url * + * @param bool $includeParams * @return string */ - public function getAbsoluteUrl(): string + public function getAbsoluteUrl($includeParams = true): string { $scheme = $this->scheme !== null ? $this->scheme . '://' : ''; $host = $this->host ?? ''; @@ -458,7 +459,7 @@ class Url implements JsonSerializable $pass = $this->password !== null ? ':' . $this->password : ''; $pass = ($user || $pass) ? $pass . '@' : ''; - return $scheme . $user . $pass . $host . $port . $this->getRelativeUrl(); + return $scheme . $user . $pass . $host . $port . $this->getRelativeUrl($includeParams); } /**