I’m using Symfony2.1 and I need to save an array in a config/parameter file because I would modify the content of this array often (probably once every 6 months) (it contains email addresses).
I know that I can save a string in parameters.yml for example using :
in app/config/parameters.yml
parameters
address: 'example@domain.com'
and retrieving this parameter using $this->container->getParameter(‘address’) in a controller, but I have many recipients and I would like to have something like :
parameters
address: array('example@domain.com', 'example2@domain.com', 'example3@domain.com)
#the number of addresses is actually not defined
Yaml syntax for arrays would be:
or
but i dont know if symfony supports this.