[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 14:44:58 CEST 2016


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

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

Url: Add basePath attribute

refs #12133

---

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

diff --git a/library/Icinga/Web/Url.php b/library/Icinga/Web/Url.php
index eee57d8..08abd2e 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,26 @@ 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