CIVICRM-230 CRM-17040 Import Contributions using External Ids causes soft credit...
[civicrm-core.git] / Civi.php
index 06bfba7fad17e8a1d3ffe296109b9a97d015160f..ae5dc6f4b1dda2f1a883542edbb0ec98c17b14dc 100644 (file)
--- a/Civi.php
+++ b/Civi.php
@@ -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
    */
@@ -94,8 +103,7 @@ class Civi {
    */
   public static function reset() {
     self::$statics = array();
-    Civi\Core\Container::getBootServices();
-    Civi\Core\Container::singleton(TRUE);
+    Civi\Core\Container::singleton();
   }
 
   /**