Commit 9897fb1e authored by totten's avatar totten

CRM-19813 - Civi::dispatcher() - Add lookup helper

The `EventDispacherInterface` is widely-used across frameworks, and this
makes it easier to lookup and autocomplete calls to the dispatcher.
parent 354345c9
......@@ -54,6 +54,15 @@ class Civi {
return Civi\Core\Container::singleton();
}
/**
* Get the event dispatcher.
*
* @return \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
public static function dispatcher() {
return Civi\Core\Container::singleton()->get('dispatcher');
}
/**
* @return \Civi\Core\Lock\LockManager
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment