On Wed, Aug 11, 2010 at 11:02 AM, Jerome Renard <[email protected]> wrote: > James, > > On Wed, Aug 11, 2010 at 10:50 AM, James Pic <[email protected]> wrote: > >> On Wed, Aug 11, 2010 at 10:40 AM, Jerome Renard <[email protected]> >> wrote: >> > Hi James, >> > >> > On Wed, Aug 11, 2010 at 10:33 AM, James Pic <[email protected]> wrote: >> > >> >> Congrats for writing yet another implementation of configuration >> override >> >> ;) >> >> >> > >> > Lol I was not aware you did that ;) >> > >> >> I know ;) >> >> Actually that happens quite frequently :P >> >> Another cool thing would be to allow multiline values, although that >> could cause some minor BC breaks :S >> >> > >> >> >> >> Another cool feature is configuration section inheritance, maybe you >> >> want to implement that as well. It's actually pretty simple, i'll post >> >> my implementation if you want. >> >> >> > >> > Configuration directive inheritance is already implement AFAIR :) >> > But reading your implement can be interesting anways, maybe there is >> > a lot of good stuff in there. >> > >> >> It's pretty trivial (sources attached), consider this example section: >> >> > I did not get anything attached. > > >> [sec] >> bar=X >> foo=Y >> >> Inheritance allows to write: >> >> [sec2..sec] >> foo=Z >> >> Instead of: >> >> [sec2] >> bar=X >> foo=Z >> >> > In the component I proposed it does not work that way actually. > > AFAIR everything inherits from the "prod" context, and you can override > configuration values for staging and dev if you want. > If you add configuration directive in a particular block it will be taken > into account as well. > Have a look at the test suite to see all use cases :)
Yes, that we have as well, although our implementation is more "dumb" and self contained in one class. In my case i use the section level configuration to reuse the same controler/action with /slightly/ different configurations to produce more pages with less work, or even with forms configurations. There goes the sources: http://gist.github.com/518721 -- http://jamespic.com/contact Customer is king - Le client est roi - El cliente es rey.
