Hello everyone, I would like use Event dispatcher to call one third party method in *lib/vendor/*, but it doesn't work. the dispatcher can't find this class. But when I use one class in *lib/*, it works, I don't know why the first test doesn't work.
Here is my code: class SomeClass { protected $dispatcher = null; public function __construct(sfEventDispatcher $dispatcher) { $this->dispatcher = sfContext::getInstance()->getEventDispatcher(); } public function someMethod(){ // some code $event = new sfEvent($this, 'api.update_message', array('message' => $message)); $this->dispatcher->notifyUntil($event); if (!$event->isProcessed()) { throw new sfException(sprintf('Call to undefined method %s::%s.', get_class($this), 'api.insert_chatbotmessage')); } return; } } in *lib/vendor/* : class Target { static public function listenToInsertMessage(sfEvent $event) { $message = $event['message']; // some code return true; } } When I call another listener in *lib/* , everything goes fine, so I wonder if symfony not include classes from *lib/vendor* by default? Any suggestion is welcome. Thanks a lot. JoJo -- 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 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