| mistake in The Definitive Guide ? [message #20728] |
Thu, 01 February 2007 13:43  |
lucjan Messages: 69 Registered: December 2006 Location: Gdansk |
Member |
|
|
I found this in the guide:
| Quote: | 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
|
I see no difference between the first and second call, and the output is different!
|
|
|
|
| Re: mistake in The Definitive Guide ? [message #20735 is a reply to message #20728 ] |
Thu, 01 February 2007 14:11  |
pezetgee Messages: 734 Registered: March 2006 |
Faithful Member |
|
|
I guess the $absolute param is missing?
From API:
| Quote: | (string) genUrl ($parameters = array(), $absolute = false)
|
|
|
|