On Aug 14, 12:33 am, Martin Kreidenweis <[EMAIL PROTECTED]> wrote: > Maybe some "magic values" like "-*" that can remove array items would be > a better idea. It is already done for HTML > assets:http://www.symfony-project.com/book/trunk/07-Inside-the-View-Layer#Fi...
Great! I had a flashback as if I had seen that kind of syntax somewhere, so I dug in almost every wrong place in the Book looking for it. > I guess this could be ported from the view config handler to the > environment config handler. But we have to account for the possibility > that someone might need to put a value like "-foo" in an array and not > want it to cause some magic (Which is not much of an issue for HTML > helpers, because they contain only parts of filenames, which usually > don't start with "-" anyway) Leading "-" could be escaped. All we have to do is to look-ahead up to 3 leading characters seeing if they're "-" or not. This would allow to handle cases like [-foo] to exclude foo, [--foo] to include literal - foo, [---foo] to exclude literal -foo. Any further "-" are treated literally. Not good, but leading - isn't common either. > So some command with a "sf"-prefix might be better. > standard_helpers: [">sf_remove:*", Partial] > standard_helpers: [">sf_remove:Form"] > Doesn't look too nice either... Too verbose ;-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony developers" 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-devs?hl=en -~----------~----~----~----~------~----~------~--~---
