Hi Jan,

Jan Markmann wrote:
> Hy Fabien,
> from what I have seen from you Symfony 2 slides I have 2 questions
> about the DI Stuff that might be of interest :
> - If I am not wrong there is no setter injection, it is constructor
> onjection only. Is Setter Injection planned?

It definitely supports setter injection. The presentation only scratches 
the surface of the Symfony 2 DI container ;)

> - Any plans to make the configurable factory independent from the
> service registry? Like for example for usage in a loop creating
> multiple instances of same config? Or some "dont care if you get a
> singleton or new instance"-context

I'm not sure I understand the question, but the DI supports what Spring 
calls "scopes". In Symfony 2, it is call "global" and allows you to 
control what the DI container returns: a single instance each time you 
get the service, or a new object.

> 
> I like the idea of pretty plain bean-alike objects like in propel and
> that of spring making it easy to put anything together like LEGO as
> long as it implements getters and setters (or as well constructor
> params).
> 
> A third and fourth are no questions but a proposals =)
> When implementing setter injection it would be nice if one could use
> the constructor signature prefixed with class name like in a new-call
> to tell what to inject via constructor and the rest via setters, thus
> making it possible to mix both.

You can mix both setter and constructor injection.

> Support for custom factory- and init-methods and a config setting for
> self managed singleton (via own factory) or container managed would be
> quite nice.

You can also use a "configure" element which is a method that can 
configure the object after initialization.

Fabien

> I think of common ways to get an instance up and ready for usage, thus
> making this tool useful for as much patterns following code around.
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to