public static function loadControllers() { self::$URL_MAP = XMLParser::parseConfigFile(); if (isset(self::$URL_MAP)) { $rootControllerDir = self::$CONTROLLER_DIR; $currentDir = $rootControllerDir; self::goToRootDir(); self::goToControllerDir(); foreach (array_values(self::$URL_MAP) as $configArr) { $controller = $configArr["controller"]; self::accessDirs($currentDir, $controller); } self::goToRootDir(); self::goToFrameworkDir(); } }
<?php require_once 'includes/XMLParser.php'; XMLParser::parseConfigFile();