1
0
mirror of https://github.com/glmdev/eecs448-lab10 synced 2024-10-27 19:14:00 +00:00
eecs448-lab10/common/autoload.php
2020-12-06 13:58:02 -06:00

21 lines
422 B
PHP

<?php
class AutoLoad {
public static function load($class_name) {
$file = str_replace("\\", '/', $class_name) . '.php';
$path = system_path($file);
if ( file_exists($path) ) {
include_system($file, false);
if ( class_exists($class_name) ) {
return true;
}
}
return false;
}
}
spl_autoload_register('AutoLoad::load');