TrackManiaControl/application/core/Libs/Symfony/autoload.php

16 lines
359 B
PHP
Raw Normal View History

2014-02-18 18:13:59 +01:00
<?php
if (!defined('EVENT_DISPATCHER_PATH')) {
define('EVENT_DISPATCHER_PATH', __DIR__);
}
spl_autoload_register(
function ($className) {
$classPath = str_replace('\\', DIRECTORY_SEPARATOR, $className);
$filePath = EVENT_DISPATCHER_PATH . DIRECTORY_SEPARATOR . $classPath . '.php';
if (file_exists($filePath)) {
require_once $filePath;
}
});