blob: 329fef2d6bff2591d882f1f9f36bfd9f92632c6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
date_default_timezone_set('UTC');
spl_autoload_register(function ($class) {
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component')) {
$file = substr(str_replace('\\', '/', $class), strlen('Symfony\Component')).'.php';
if (file_exists(__DIR__.'/../..'.$file)) {
# Run from source tree
require_once __DIR__.'/../..'.$file;
} else {
# Run from install dir
require_once 'Symfony/Component'.$file;
}
}
});
|