Ho trovato questo article con alcuni modi interessanti:
1) senza parametri utilizzare un array vuoto:
// Using a route with the name "register" and the route "/register"
echo $this->url('register', array(), array('force_canonical' => true));
// Output: http://mydomain.com/register
2) notare le differenze tra:
echo $this->serverUrl();
// Output: http://mydomain.com
e
// Current URL: http://mydomain.com/register
echo $this->serverUrl(true);
// Output: http://mydomain.com/register
3) a partire dal percorso
// The "register" route has the following route: /register
echo $this->serverUrl($this->url('register'));
// Output: http://mydomain.com/register
fonte
2013-07-03 22:26:19
La domanda è di circa generare URL completo nella vista. Ma se qualcuno arriva qui alla ricerca di come farlo nel controller, ecco: '$ this-> getRequest() -> getServer ('HTTP_HOST'). $ this-> url() -> fromRoute ('carrinho/compra-efetuada') ' – vinigarcia87