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
*/
* @return \Civi\Core\Paths
*/
public static function paths() {
- // Paths must be available before container can boot.
- if (!isset(Civi::$statics[__CLASS__]['paths'])) {
- Civi::$statics[__CLASS__]['paths'] = new \Civi\Core\Paths();
- }
- return Civi::$statics[__CLASS__]['paths'];
+ return \Civi\Core\Container::getBootService('paths');
}
/**
*/
public static function reset() {
self::$statics = array();
- Civi\Core\Container::getBootServices();
- Civi\Core\Container::singleton(TRUE);
+ Civi\Core\Container::singleton();
}
/**