【发布时间】:2012-05-30 11:37:58
【问题描述】:
我想(需要)在 Zend Framework 1.11 中使用 Symfony EventDispatcher 我在 zf 的引导程序中加载了 EventDispatcher...
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);
}
我的问题是,如何在 ZF 控制器中使用它?
感谢您的帮助。 最好的问候,
【问题讨论】:
-
您可以阅读有关如何使用事件调度程序的手册。它独立于框架symfony.com/doc/current/components/event_dispatcher/…
标签: php zend-framework symfony1 event-dispatching