symfony
symfony forum
Home » development » Documentation » mistake in The Definitive Guide ?
mistake in The Definitive Guide ? [message #20728] Thu, 01 February 2007 13:43 Go to next message
lucjan  is currently offline 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 #20732 is a reply to message #20728 ] Thu, 01 February 2007 13:58 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9514
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Might be worth a trac ticket?


Remember Palestine
Re: mistake in The Definitive Guide ? [message #20735 is a reply to message #20728 ] Thu, 01 February 2007 14:11 Go to previous message
pezetgee
Messages: 734
Registered: March 2006
Faithful Member
I guess the $absolute param is missing?

From API:
Quote:

(string) genUrl ($parameters = array(), $absolute = false)
Previous Topic:Comment regarding sfDoctrine and the model page
Next Topic:My first symfony project Documentation enhancements
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software