There are some other posts on this, and a lot of people seem to set
$_SERVER['HOST'] using a value in the app.yml.  I didn't find that
works for my links (which all use pattern routing).  I store my host
in my app.yml, but I do this slightly differently:

1) Create a dummy default web context.
2) Update the router in your default context so you replace the host
parameter

Code is below:

    $configuration = ProjectConfiguration::getApplicationConfiguration
    ($options['application'], $options['aux-env'], true);
    $context = sfContext::getInstance('default');
    $routing = $context->getRouting();
    $host = sfConfig::get('app_routing_webhost');
    $options = $routing->getOptions();
    $options['context']['host'] = $host;
    $routing->initialize($this->dispatcher, $routing->getCache(),
$options);
    $context->set('routing', $routing);


On Jun 5, 5:25 pm, Jack Bates <[email protected]> wrote:
> How do I generate aURLin atask?
>
> I can generate URLs in templates - how do I generate aURLin lib/task/
> MyTask.class.php?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to