[icinga-checkins] icinga.org: icingaweb2/master: Web\Request: the request should know the URL

git at icinga.org git at icinga.org
Sun Nov 16 00:38:40 CET 2014


Module: icingaweb2
Branch: master
Commit: 0fd4a094ea7a0415af521113f0f9052b7f0af72e
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=0fd4a094ea7a0415af521113f0f9052b7f0af72e

Author: Thomas Gelf <thomas at gelf.net>
Date:   Sat Nov 15 22:40:29 2014 +0100

Web\Request: the request should know the URL

---

 library/Icinga/Web/Request.php |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/library/Icinga/Web/Request.php b/library/Icinga/Web/Request.php
index 8b09f68..ae957f6 100644
--- a/library/Icinga/Web/Request.php
+++ b/library/Icinga/Web/Request.php
@@ -19,6 +19,16 @@ class Request extends Zend_Controller_Request_Http
      */
     private $user;
 
+    private $url;
+
+    public function getUrl()
+    {
+        if ($this->url === null) {
+            $this->url = Url::fromRequest($this);
+        }
+        return $this->url;
+    }
+
     /**
      * Setter for user
      *



More information about the icinga-checkins mailing list