Url: Add basePath attribute

refs #12133
This commit is contained in:
Noah Hilverling 2016-10-14 15:01:03 +02:00
parent f557b89aea
commit 3e2f3c8467
1 changed files with 30 additions and 0 deletions

View File

@ -45,6 +45,13 @@ class Url
*/ */
protected $path = ''; protected $path = '';
/**
* The basePath of this Url
*
* @var string
*/
protected $basePath;
/** /**
* The baseUrl that will be appended to @see Url::$path * 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 * Overwrite the host
* *