public static function load($class)
	{
		if (class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false))
		{
			return;
		}

		$rootDir = System::getContainer()->getParameter('kernel.project_dir');

		// The class file is set in the mapper
		if (isset(self::$classes[$class]))
		{
			if (Config::get('debugMode'))
			{
				$GLOBALS['TL_DEBUG']['classes_set'][$class] = $class;
			}

			include $rootDir . '/' . self::$classes[$class];
		}

		// Find the class in the registered namespaces
		elseif (($namespaced = self::findClass($class)) !== null)
		{
			if (!class_exists($namespaced, false) && !interface_exists($namespaced, false) && !trait_exists($namespaced, false))
			{
				if (Config::get('debugMode'))
				{
					$GLOBALS['TL_DEBUG']['classes_aliased'][$class] = $namespaced;
				}

				include $rootDir . '/' . self::$classes[$namespaced];
			}

			class_alias($namespaced, $class);
		}

		// Try to map the class to a Contao class loaded via Composer
		elseif (strncmp($class, 'Contao\\', 7) !== 0)
		{
			$namespaced = 'Contao\\' . $class;

			if (class_exists($namespaced) || interface_exists($namespaced) || trait_exists($namespaced))
			{
				if (Config::get('debugMode'))
				{
					$GLOBALS['TL_DEBUG']['classes_composerized'][$class] = $namespaced;
				}

				if (!class_exists($class, false) && !interface_exists($class, false) && !trait_exists($class, false))
				{
					class_alias($namespaced, $class);
				}
			}
		}

		// Pass the request to other autoloaders (e.g. Swift)
	}