Not sure whats the symfony way but in one of our projects I did this
We had a separate project.yml file which had application wide
parameters (somethings used in all apps), we added parameters from
that file to sfConfig and used below to update it.
This example is for adding new parameter, you can modify for changing too.
$arr = sfYAML::Load(sfConfig :: get('project_config_dir').'/project.yml');
$arr['test'] = 200;
sfConfig::set('test',200); //You need this so that parameter is available
$yaml = sfYaml::dump($arr);
file_put_contents(sfConfig :: get('project_config_dir').'/project.yml', $yaml);
HTH
On 8/20/07, Greg Freeman <[EMAIL PROTECTED]> wrote:
>
> Is it possible to just do something like
>
> sfConfig::set('var', 'value');
>
> and then save it somehow? I just want to be able to write to the
> app.yml
>
>
> >
>
--
w: www.techjini.com | www.cheermyteam.com | www.valuejini.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---