/** * Factory method for this class * * @return plugin_manager the singleton instance */ public static function instance() { if (is_null(self::$singletoninstance)) { self::$singletoninstance = new self(); } return self::$singletoninstance; }
/** * Reset any caches * @param bool $phpunitreset */ public static function reset_caches($phpunitreset = false) { if ($phpunitreset) { self::$singletoninstance = null; } }