On 08.11.2010, at 11:22, Fabien Potencier wrote: > On 10/29/10 6:07 PM, Benjamin Eberlei wrote: >> Problem 1: One Service Id only has one static implementing class >> >> Say we have a Templating Service id "templating" and a class >> "MyTemplateEngine". This is used throughout your project whenever a >> controller needs a template engine. Now someday you have a need for a >> second "MyNewTemplateEngine", but you don't want to replace the old one >> for all the old controllers. >> >> The DIC Factory option is a possible solution here, but the DIC >> container is a pattern to avoid having to write factory classes. Why >> starting again? > > If you need a second template engine, you need another service, with a > *different* name: > > templating > templating.smarty > > Problem solved.
yes. the idea of "context" doesnt propose anything else. its about how to select the right service dynamically. aka if the request wants a json response that you pick the right view to generate a json response. regards, Lukas Kahwe Smith m...@pooteeweet.org -- 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 symfony-devs@googlegroups.com To unsubscribe from this group, send email to symfony-devs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en