Add a lot

This commit is contained in:
2018-11-27 13:59:21 +09:00
parent d9e043c468
commit 561bfbf475
37 changed files with 8589 additions and 7952 deletions

View File

@ -4,21 +4,21 @@ namespace CAUProject3Contact;
class Autoloader {
/**
* Enregistre notre autoloader
*/
static function register() {
spl_autoload_register( array( __CLASS__, 'autoload' ) );
}
/**
* Enregistre notre autoloader
*/
static function register() {
spl_autoload_register( array( __CLASS__, 'autoload' ) );
}
/**
* Inclue le fichier correspondant à notre classe
*
* @param $class string Le nom de la classe à charger
*/
static function autoload( $class ) {
if ( preg_match( '#^' . Config::NAMESPACE . '\\\(.+)$#', $class, $matches ) ) {
require 'src/' . str_replace( '\\', '/', $matches[1] ) . '.php';
}
}
/**
* Inclue le fichier correspondant à notre classe
*
* @param $class string Le nom de la classe à charger
*/
static function autoload( $class ) {
if ( preg_match( '#^' . Config::NAMESPACE . '\\\(.+)$#', $class, $matches ) ) {
require 'src/' . str_replace( '\\', '/', $matches[ 1 ] ) . '.php';
}
}
}