app.yml parameters in Tasks [message #73129] |
Sun, 22 February 2009 19:39  |
onlydust Messages: 47 Registered: May 2008 |
Member |
|
|
Hello,
I try to sending emails from symfony project with task executed in cron. My problem is, when i try to get some application variables(sender email for example) from app.yml i can not get its value. When i write:
sfConfig::get('app_sender_email')
i get NULL value.
Tasks can not take values from app.yml ?
Sorry for my english.
|
|
|
|
|
|
Re: app.yml parameters in Tasks [message #102377 is a reply to message #73129 ] |
Mon, 12 July 2010 18:05  |
I30bby Messages: 1 Registered: July 2010 Location: Montreal, QC, CA |
Junior Member |
|
|
To setup a default application, you can simply modify your 'configure' function like this :
protected function configure()
{
...
...
$this->addOptions(array(
new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name', 'frontend'),
new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'),
new sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'doctrine'),
// add your own options here
));
Si le problème a une solution, il ne sert à rien de s'inquiéter. Mais s'il n'en a pas, alors s'inquiéter ne change rien.
|
|
|