From 3e2f3c8467c4c010211bc54389d0ef442627eb4e Mon Sep 17 00:00:00 2001 From: Noah Hilverling Date: Fri, 14 Oct 2016 15:01:03 +0200 Subject: [PATCH] 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 eee57d82c..43de21f11 100644 --- a/library/Icinga/Web/Url.php +++ b/library/Icinga/Web/Url.php @@ -45,6 +45,13 @@ class Url */ protected $path = ''; + /** + * The basePath of this Url + * + * @var string + */ + protected $basePath; + /** * The baseUrl that will be appended to @see Url::$path * @@ -266,6 +273,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 *