Base d'un site web v2
This commit is contained in:
@ -7,7 +7,7 @@ class Autoloader {
|
||||
/**
|
||||
* Enregistre notre autoloader
|
||||
*/
|
||||
static function register(){
|
||||
static function register() {
|
||||
spl_autoload_register(array(__CLASS__, 'autoload'));
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ class Autoloader {
|
||||
* Inclue le fichier correspondant à notre classe
|
||||
* @param $class string Le nom de la classe à charger
|
||||
*/
|
||||
static function autoload($class){
|
||||
static function autoload($class) {
|
||||
if (preg_match('#^' . Config::NAMESPACE . '\\\(.+)$#', $class, $matches))
|
||||
require 'src/' . str_replace('\\', '/', $matches[1]) . '.php';
|
||||
}
|
||||
|
Reference in New Issue
Block a user