On 08.02.2011, at 13:20, Venzon wrote: > On 8 Lut, 13:01, Lukas Kahwe Smith <[email protected]> wrote: >> On 08.02.2011, at 11:54, Venzon wrote: >> >>> In my project I need to extend several core classes like router.class, >>> router.options.generator_class and >>> router.options.generator_base_class. >>> I use parameters array in config.yml to override basic settings: >> >>> parameters: >>> router.class: "Application\HelloBundle\Routing\Router" >> >>> Is this proper way of extending core classes? Before latest changes I >>> was doing this using extension xml config file. Because it is not >>> working anymore I use config.yml for this purpose. >> >> no .. the proper way is to get support in the given extension to customize >> this in the app config. >> >> regards, >> Lukas Kahwe Smith > > I assume you meant using setParameter in configLoad method of > extension file: > > class HelloExtension extends Extension > { > public function configLoad($config, ContainerBuilder $container) { > ... > if (isset($config['router.class'])) { > $container->setParameter('router.class', > $config['router.class']); > } > } > ... > } > > Will it be the proper way?
no i mean fixing the given Extension that currently loads the config that defines the service. so in this case FrameworkExtension. as a last resort i think the cleanest solution to change such parameters if the Extension doesnt support is a Compiler pass. 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
