public static function setSingletonInstance($instance) { $class = get_called_class(); self::$instances[$class] = $instance; }