Re: [symfony-devs] Contexts for the Symfony DIC

2010-11-08 Thread Lukas Kahwe Smith
On 08.11.2010, at 11:36, Fabien Potencier wrote: > On 11/8/10 5:26 PM, Lukas Kahwe Smith wrote: >> >> 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

Re: [symfony-devs] Contexts for the Symfony DIC

2010-11-08 Thread Fabien Potencier
On 11/8/10 5:26 PM, Lukas Kahwe Smith wrote: 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

Re: [symfony-devs] Contexts for the Symfony DIC

2010-11-08 Thread Lukas Kahwe Smith
On 08.11.2010, at 11:26, Fabien Potencier wrote: > On 10/29/10 6:07 PM, Benjamin Eberlei wrote: >> Problem 2: In a modular application (Symfony Bundle) two components >> overwrite the same basic service in an incompatible way. > > When you want to "override" a service, define the new service (wi

Re: [symfony-devs] Contexts for the Symfony DIC

2010-11-08 Thread Fabien Potencier
On 10/29/10 6:07 PM, Benjamin Eberlei wrote: Problem 2: In a modular application (Symfony Bundle) two components overwrite the same basic service in an incompatible way. When you want to "override" a service, define the new service (with a new name), and the developer can choose the service he

Re: [symfony-devs] Contexts for the Symfony DIC

2010-11-08 Thread Lukas Kahwe Smith
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 whene

Re: [symfony-devs] Contexts for the Symfony DIC

2010-11-08 Thread Fabien Potencier
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

Re: [symfony-devs] Contexts for the Symfony DIC

2010-10-30 Thread Lukas Kahwe Smith
On 29.10.2010, at 22:54, Lukas Kahwe Smith wrote: > > Now a big problem I see is that I guess there needs to be a way to define the > request to have multiple contexts at the same time, just like Benjamin showed > in his example: > >> foo: >> pattern: /foo.:_format >> defaults: { _controlle

Re: [symfony-devs] Contexts for the Symfony DIC

2010-10-30 Thread Lukas Kahwe Smith
On 30.10.2010, at 10:40, Jordi Boggiano wrote: > On 29.10.2010 22:54, Lukas Kahwe Smith wrote: >>> foo: >>> pattern: /foo.:_format >>> defaults: { _controller: FooController:indexAction, contexts: ["mybundle", >>> ":_format"] } > > I think contexts are a great idea for advanced use cases and

Re: [symfony-devs] Contexts for the Symfony DIC

2010-10-30 Thread Jordi Boggiano
On 29.10.2010 22:54, Lukas Kahwe Smith wrote: >> foo: >> pattern: /foo.:_format >> defaults: { _controller: FooController:indexAction, contexts: ["mybundle", >> ":_format"] } I think contexts are a great idea for advanced use cases and even more flexibility, but even assuming we fix the overla

Re: [symfony-devs] Contexts for the Symfony DIC

2010-10-29 Thread Lukas Kahwe Smith
On 29.10.2010, at 18:07, Benjamin Eberlei wrote: > Then have a configuration for this in the XML (pseudo, any other form > would also work) > > > > > > > > > > > > The above is obviously pseudo code. So lets try to develop this further I guess there is no reason wh

Re: [symfony-devs] Contexts for the Symfony DIC

2010-10-29 Thread Lukas Kahwe Smith
On 29.10.2010, at 18:11, Benjamin Eberlei wrote: > Oh i forgot the third problem which got us started discussing in > #symfony-cmf > > Using a different template engine based on the request context (xml, > json, pdf, html). right .. the beauty of this is that in you can support multiple differ

Re: [symfony-devs] Contexts for the Symfony DIC

2010-10-29 Thread Benjamin Eberlei
Oh i forgot the third problem which got us started discussing in #symfony-cmf Using a different template engine based on the request context (xml, json, pdf, html). On Fri, 2010-10-29 at 18:07 +0200, Benjamin Eberlei wrote: > Hello everyone, > > I want to drop something into the current state o