Web\Url: provide a with() function

This commit is contained in:
Thomas Gelf 2014-09-05 11:21:10 +02:00
parent 4c8407e2b6
commit 1c2207f51d
1 changed files with 7 additions and 0 deletions

View File

@ -424,6 +424,13 @@ class Url
return $url;
}
public function with($param, $values = null)
{
$url = clone($this);
$url->params->mergeValues($param, $values);
return $url;
}
public function __clone()
{
$this->params = clone $this->params;