/** * @access private * @param $setClassLoader */ public function getClassAutoloader($setClassLoader) { if ($this->getFilesRequire() != false) { $this->getFilesRequire(); } if (is_array($setClassLoader)) { //$mp_autoloader = dirname(__FILE__).'/component/loader/autoloader.php'; $loader = new autoloader(); $loader->registerPrefixFallbacks($setClassLoader); $loader->register(); } }
<?php //Include Config files. include 'app/config/routes.php'; include 'app/config/paths.php'; //Initialize Autoloader. include 'app/system/autoloader.php'; autoloader::register(); //Initialize the router with URL and route config file. $router = new Router($routes, $_GET['url']); switch ($_SERVER['REQUEST_METHOD']) { case 'GET': $router->get($_GET['url']); break; case 'POST': $router->post($_GET['url']); break; case 'PUT': //need to be done $router->put($_GET['url']); break; case 'DELETE': //need to be done $router->delete($_GET['url']); break; default: die('not a valid Request Method, request method =' . $_SERVER['REQUEST_METHOD']); }
# Do not edit or add to this file if you wish to upgrade MAGIX CMS to newer # versions in the future. If you wish to customize MAGIX CMS for your # needs please refer to http://www.magix-cms.com for more information. */ /** * Fichier de configuration */ $config_in = 'app/init/common.inc.php'; if (file_exists($config_in)) { require $config_in; } else { throw new Exception('Error Ini Common Files'); exit; } /** * Chargement du Bootsrap */ $bootstrap = __DIR__ . '/bootstrap.php'; if (file_exists($bootstrap)) { require $bootstrap; } else { throw new Exception('Boostrap is not exist'); } /** * Autoloader registerPrefixes pour les composants du CMS */ $loader = new autoloader(); $loader->registerPrefixes(array('component' => 'app', 'frontend' => 'app')); $loader->register();