reasonableframework/vendor/autoload.php
2017-12-18 05:40:04 +09:00

12 lines
307 B
PHP

<?php
define("VENDOR_PATH", './vendor');
// class loader
function my_autoloader($className) {
if(!class_exists($className)) {
$classFileName = str_replace("\\", "/", $className);
include_once(VENDOR_PATH . '/' . $classFileName . '.php');
}
}
spl_autoload_register('my_autoloader');