CRM-14478 - ManagedEntities - Add support for 'cleanup' policy ("unused")
[civicrm-core.git] / Civi / Core / Container.php
index 504f206666ed38a2e0409d095b9b5eabf80ef752..f70369ad150eb5a373ef5c162ea39e32e720bd70 100644 (file)
@@ -27,10 +27,11 @@ class Container {
   private static $singleton;
 
   /**
+   * @param bool $reset whether to forcibly rebuild the entire container
    * @return \Symfony\Component\DependencyInjection\TaggedContainerInterface
    */
-  public static function singleton() {
-    if (self::$singleton === NULL) {
+  public static function singleton($reset = FALSE) {
+    if ($reset || self::$singleton === NULL) {
       $c = new self();
       self::$singleton = $c->createContainer();
     }