At the bottom of the page:http://www.symfony-project.com/book/trunk/09-Links-and-the-Routing-System
If you need to transform an internal URI into an external URL in an action--just as url_for()
does in a template--use the genUrl() method of the sfController object, as shown in Listing 9-26.
Listing 9-26 - Using sfController to Transform an Internal URI
$uri = 'article/read?id=21';
$url = $this->getController()->genUrl($uri);
=> /article/21
$url = $this->getController()->genUrl($uri);
=> http://myapp.example.com/article/21
Probably the second link should look like this:
$url = $this->getController()->genUrl($uri,true);
(from http://www.symfony-project.com/forum/index.php/t/4838/ )