I want(need) to use Symfony EventDispatcher inside Zend Framework 1.11 I have the EventDispatcher being loaded in the Bootstrap of zf...
public function run()
{
require APPLICATION_PATH .
'/../library/Symfony/Component/EventDispatcher/EventDispatcher.php';
$dispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
$dispatcher->dispatch("bootstrap.prerun", null);
parent::run();
$dispatcher->dispatch("bootstrap.postrun", null);
}
My question is, how can I use it inside the ZF controllers ?
Thank you for any help. Best regards,
I'm replying to this because my problem was understanding how I could integrate both frameworks so I could have the EventDispatcher of Symfony working on all my ZF application including modules.
This was my solution: On the bootstrap..
I created a resource for EventDispatcher to be instantiated this way it will be globally accessible by the bootstrap and can be started has a resource. The resource code is:
And in the application.ini I setup
I used this example on how to create a resource: http://blog.madarco.net/327/how-to-make-your-own-zend-framework-resource-plugin/
I'm still working in this but looks like it's working well on the first test...