On Wed, 26 Jan 2011 07:59:04 -0800 (PST), Venzon <[email protected]> wrote:
> I think I was wrong, seems that I confused these two parameters:
>
> <parameters>
> <parameter key="router.options.generator_class">Symfony\Component
> \Routing\Generator\UrlGenerator</parameter>
> <parameter key="router.options.generator_base_class">Symfony
> \Component\Routing\Generator\UrlGenerator</parameter>
> </parameters>
>
> overriding them in hellobundle extension indeed was noticed by core
> extension loader
>
> ... still is it possible to add for example setter mothod to already
> defined service or will it require creating new service? For example
> some extra set method to router service?
It is possible in a DI extension by calling
$container->getDefinition('my.service.id')->addMethodCall(...)
But this implies that your extension is called after the service is
registered (and this relies of the order of the bundles in the kernel)
the safe and good solution is to use a CompilerPass but this is more
complex.
--
Christophe | Stof
--
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