public static function &getPlatform($platform, $instance)
	{
		static $instances;
		if (!isset($instances)) {
			$instances = array();
		}

		$platform = ucfirst(strtolower($platform));

		//only create a new thread instance if it has not been created before
		if (!isset($instances[$platform][$instance])) {
			$name = static::getNameFromInstance($instance);

			static::pluginAutoLoad($name);

			$class = '\JFusion\Plugins\\' . $name . '\Platform\\' . $platform . '\\Platform';
			if (!class_exists($class)) {
				$class = '\JFusion\Plugin\Platform\\' . $platform;
			}
			if (!class_exists($class)) {
				$class = '\JFusion\Plugin\Platform';
			}
			$instances[$platform][$instance] = new $class($instance);
		}
		return $instances[$platform][$instance];
	}