diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-10-11 00:25:12 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-10-11 00:25:12 +0400 |
commit | 7da0007856df9b35891e484c9320a37749041ff3 (patch) | |
tree | 56aab70db83533b1284b3d05fca8ae3b5433a10b /core/Singleton.php | |
parent | 401597b12baeabf89324a0564362c59a3c9e93ee (diff) |
Refs #4208 refactor some singletons
Diffstat (limited to 'core/Singleton.php')
-rw-r--r-- | core/Singleton.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/Singleton.php b/core/Singleton.php index 7e7679c67a..73bbd26196 100644 --- a/core/Singleton.php +++ b/core/Singleton.php @@ -34,4 +34,13 @@ class Singleton $class = get_called_class(); unset(self::$instances[$class]); } + + /** + * Sets the singleton instance. For testing purposes. + */ + public static function setSingletonInstance($instance) + { + $class = get_called_class(); + self::$instances[$class] = $instance; + } } |