[icinga-checkins] icinga.org: icingaweb2/bugfix/ username-and-password-not-being-passed-in-navigation-item-urls-12133: Url: Add basePath attribute

git at icinga.org git at icinga.org
Fri Oct 14 15:06:01 CEST 2016


Module: icingaweb2
Branch: bugfix/username-and-password-not-being-passed-in-navigation-item-urls-12133
Commit: 3e2f3c8467c4c010211bc54389d0ef442627eb4e
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=3e2f3c8467c4c010211bc54389d0ef442627eb4e

Author: Noah Hilverling <noah.hilverling at netways.de>
Date:   Fri Oct 14 15:01:03 2016 +0200

Url: Add basePath attribute

refs #12133

---

 library/Icinga/Web/Url.php |   30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/library/Icinga/Web/Url.php b/library/Icinga/Web/Url.php
index eee57d8..43de21f 100644
--- a/library/Icinga/Web/Url.php
+++ b/library/Icinga/Web/Url.php
@@ -46,6 +46,13 @@ class Url
     protected $path = '';
 
     /**
+     * The basePath of this Url
+     *
+     * @var string
+     */
+    protected $basePath;
+
+    /**
      * The baseUrl that will be appended to @see Url::$path
      *
      * @var string
@@ -267,6 +274,29 @@ class Url
 
 
     /**
+     * Set the basePath for this url
+     *
+     * @param   string  $basePath     New basePath of this url
+     *
+     * @return  $this
+     */
+    public function setBasePath($basePath)
+    {
+        $this->basePath = $basePath;
+        return $this;
+    }
+
+    /**
+     * Return the basePath set for this url
+     *
+     * @return  string
+     */
+    public function getBasePath()
+    {
+        return $this->basePath;
+    }
+
+    /**
      * Overwrite the host
      *
      * @param   string  $host     New host of this Url



More information about the icinga-checkins mailing list