/** * Purge all instances returned by makeInstance. * * This function is most useful when called from tearDown in a test case * to drop any instances that have been created by the tests. * * Warning: This is a helper method for unit tests. Do not call this directly in production code! * * @see makeInstance * @return void */ public static function purgeInstances() { self::$singletonInstances = array(); self::$nonSingletonInstances = array(); }