UrlRequest: add current_absolute_url & current_absolute_full_url properties

This commit is contained in:
Benjamin Renard 2024-11-29 17:11:48 +01:00
parent 7217fe9303
commit 990a15957a
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -78,6 +78,12 @@ class UrlRequest {
return $this -> current_url; return $this -> current_url;
if ($key == 'current_full_url') if ($key == 'current_full_url')
return Url::add_url_parameters($this -> current_url, $_GET, false); return Url::add_url_parameters($this -> current_url, $_GET, false);
if ($key == 'current_absolute_url')
return Url::get_absolute_url($this -> current_url);
if ($key == 'current_absolute_full_url')
return Url::get_absolute_url(
Url::add_url_parameters($this -> current_url, $_GET, false)
);
if ($key == 'handler') if ($key == 'handler')
return $this -> handler; return $this -> handler;
if ($key == 'authenticated') if ($key == 'authenticated')