Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[HttpFoundation] added a way to generate a URI based on the current o…
…ne and a path
  • Loading branch information
fabpot committed Oct 19, 2010
1 parent 56d9830 commit 94347f7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Symfony/Component/HttpFoundation/Request.php
Expand Up @@ -374,6 +374,18 @@ public function getUri()
return $this->getScheme().'://'.$this->getHost().':'.$this->getPort().$this->getScriptName().$this->getPathInfo().$qs;
}

/**
* Generates a normalized URI for the given path.
*
* @param string $path A path to use instead of the current one
*
* @return string The normalized URI for the path
*/
public function getUriForPath($path)
{
return $this->getScheme().'://'.$this->getHost().':'.$this->getPort().$this->getScriptName().$path;
}

/**
* Generates the normalized query string for the Request.
*
Expand Down

0 comments on commit 94347f7

Please sign in to comment.