[symfony-users] Re: app.yml array is not array on first level

2010-06-15 Thread Svetoslav Shterev
http://www.symfony-project.org/book/1_2/05-Configuring-Symfony#chapter_05_sub_custom_application_settings_and_app_yml
It's documented there - When you should require an PHP array
directly beneath the all key you need to use a category header,
otherwise symfony will make the values separately available as shown
above.

On Jun 14, 6:26 pm, Tom Ptacnik to...@tomor.cz wrote:
 No, underscores are ok, even if I chage it to

 all:
   test: [cs, en]

 it's the same

 sfConfig::add(array(
   'app_test_0' = 'cs',
   'app_test_1' = 'en',

 As pghoratiu  sad. It looks like an undocumented feature. Never mind I
 can live with that. One must just remember that :)

 On 14 čvn, 14:45, Eno symb...@gmail.com wrote:

  On Mon, 14 Jun 2010, Tom Ptacnik wrote:
   Do someone know why first solution produce bad array and second will
   produce good array?
   I'm talking abou settings in app.yml

   1)
   all:
     frontend_cultures: [cs, en]

   will produce (cache/app/dev/app.yml.php):

   'app_frontend_cultures_0' = 'cs',
   'app_frontend_cultures_1' = 'en',

   2)
   all:
     frontend:
       cultures: [cs, en]

    'app_frontend_cultures' = array (
     0 = 'cs',
     1 = 'en',
   ),

  Im guessing using an underscore in the array name is a problem since the
  config handler uses underscores too.

  You can use alternate syntax.

 http://www.symfony-project.org/gentle-introduction/1_4/en/05-Configur...

  --

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: app.yml array is not array on first level

2010-06-14 Thread pghoratiu
Hi!

I think this is by design, sort of a undocumented feature.
I had this problem as well when I first encountered it and since than
I remembered to always use the second level to store arrays.

gabriel

On Jun 14, 11:43 am, Tom Ptacnik to...@tomor.cz wrote:
 Do someone know why first solution produce bad array and second will
 produce good array?
 I'm talking abou settings in app.yml

 1)
 all:
   frontend_cultures: [cs, en]

 will produce (cache/app/dev/app.yml.php):

 'app_frontend_cultures_0' = 'cs',
 'app_frontend_cultures_1' = 'en',

 2)
 all:
   frontend:
     cultures: [cs, en]

  'app_frontend_cultures' = array (
   0 = 'cs',
   1 = 'en',
 ),

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en