On 05.12.2010, at 13:12, Marijn wrote:
> This might be a solution although I really feel that we're setting out
> a terrible example by encouraging people to inject service containers
> into their objects.
I totally agree that injecting containers into services is a very bad idea.
However with this whitelisting array map its not so horrible, however it also
makes the "solution" impractical with the current syntax as one would have to
define one service for each whitelist+map making this "idea" worthless to me
unless we want a better solution to define a service with the same class and
different parameters
Something like:
filter_container:
class: Bundle\FilterContainerBundle\Container\Filter
arguments:
container: @service_container
servicemappings: []
shared: true
fooDefault:
class: Application\FooBundle\Controller\DefaultController
arguments:
request: @request
templating: @templating
optional: @filter_container[ servicemappings: [mailer: mailer] ]
shared: true
Again just throwing some ideas out, definitely not finished.
regards,
Lukas Kahwe Smith
[email protected]
--
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