Hello, I'm not sure about how to do that, but a simple trick would be to have a static method in your ProjectConfiguration class which will return the dispatcher:
// in your ProjectConfiguration.class.php public static function getEventDispatcherInstance() { return self::getActive()->getEventDispatcher() } // and in your services.yml dispatcher: class: ProjectConfiguratition constructor: getEventDispatcherInstance On Thu, Sep 17, 2009 at 12:42 AM, david.stendardi <david.stenda...@gmail.com > wrote: > > Hello folks, > > I'am integrating the dependeny injection on a project and i must say > it is very efficient. > I discovered the "constructor" option that allowed me to connect > existing symfony singleton to my component by writing something like > this in my service.yml : > > context: > class: sfContext > constructor: getInstance > > my.service: > class: myServiceClass > arguments: [...@context] > > > Anyway, i don't like very much the idea to be dependant of sfContext, > and i would like to now if there is a way to > create a dependency to sfEventDispatcher used by the project > configuration, without having to refer to a specific content ? > > Cheers ! > > > > However i would like > > > > -- Noël GUILBERT http://www.noelguilbert.com/ http://www.sensiolabs.com http://www.symfony-project.com Sensio Labs Tél: +33 1 40 99 80 80 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---