Tuesday, December 06, 2011

sfConfig in tasks to access app.yml

When you load a task, there is no application defined.

so you cannot get any app.yml definition.

for that you need to specify an application when you call the tasks ex:

symfony project:do-nothing --application="frontend"

and then you will be able to get the value of sfConfig::get('app_sender_email')

It should be possible to setup a default application, but i didn't find it out.

No comments: