MDL-36199 reset plugin manager singletons

This commit is contained in:
Petr Škoda
2012-10-25 00:55:10 +08:00
parent 7e8ae12a7a
commit 9854743221
2 changed files with 28 additions and 0 deletions
+20
View File
@@ -86,6 +86,16 @@ class plugin_manager {
return self::$singletoninstance;
}
/**
* Reset any caches
* @param bool $phpunitreset
*/
public static function reset_caches($phpunitreset = false) {
if ($phpunitreset) {
self::$singletoninstance = null;
}
}
/**
* Returns a tree of known plugins and information about them
*
@@ -672,6 +682,16 @@ class available_update_checker {
return self::$singletoninstance;
}
/**
* Reset any caches
* @param bool $phpunitreset
*/
public static function reset_caches($phpunitreset = false) {
if ($phpunitreset) {
self::$singletoninstance = null;
}
}
/**
* Returns the timestamp of the last execution of {@link fetch()}
*