1
0
mirror of https://github.com/danog/amp.git synced 2024-11-30 04:29:08 +01:00
amp/autoload.php
2013-08-07 00:17:57 -04:00

12 lines
282 B
PHP

<?php
spl_autoload_register(function($class) {
if (0 === strpos($class, 'Alert\\')) {
$class = str_replace('\\', DIRECTORY_SEPARATOR, $class);
$file = __DIR__ . "/src/$class.php";
if (file_exists($file)) {
require $file;
}
}
});