From 990a15957aa6b2b693001bc569a2eff986010c91 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 29 Nov 2024 17:11:48 +0100 Subject: [PATCH] UrlRequest: add current_absolute_url & current_absolute_full_url properties --- src/UrlRequest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/UrlRequest.php b/src/UrlRequest.php index 5dc0cc1..765f0d3 100644 --- a/src/UrlRequest.php +++ b/src/UrlRequest.php @@ -78,6 +78,12 @@ class UrlRequest { return $this -> current_url; if ($key == 'current_full_url') 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') return $this -> handler; if ($key == 'authenticated')