On Mon, May 2, 2011 at 9:09 PM, Kris Wallsmith <[email protected]> wrote: > I think it is misleading to the user to encourage the use of class constants > as event names. An event name is a simple string in a global namespace while > a class constant includes a namespace and class name. I am concerned that > users will create disparate class constants with the same value, leading to > a collision. For example, if Foo\Bar::preExecute and Bar\Foo::preExecute are > both equal to 'preExecute' they will both trigger the same listeners when > dispatched, which will probably lead to unexpected results and some > unnecessary WTFs. > The best solution I can think of is to stop using class constants and just > use simple strings instead. This will make it clear to the user that they > are dealing with a simple string in a global namespace. > $dispatcher->dispatch('preSomethingExecute') > What do you think?
I think I liked how it was namespaced before, core.request, core.response, it looks like service names etc. Now it looks like IE's onfoo JS events, except with a camelCased spin on them. Cheers -- Jordi Boggiano @seldaek :: http://seld.be/ -- 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 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
