Added include param parameter to Url::getAbsoluteUrl method.

This commit is contained in:
Simon Sessingø
2021-04-01 03:14:22 +02:00
parent b94dc4355f
commit ecbb0825e0

View File

@@ -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);
}
/**