diff options
author | Remi Collet <fedora@famillecollet.com> | 2012-10-06 17:11:08 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2012-10-06 17:11:08 +0200 |
commit | b01e027a68be1deeeb387507c52f0e808a453ea4 (patch) | |
tree | 879cb36d6a413d00322a0e98fdc2d08c2d2167b3 /bootstrap.php | |
parent | 2ac9b8d4184938779680e91246d42cf5c5b20742 (diff) |
php-symfony2-Serializer 2.1.2
Diffstat (limited to 'bootstrap.php')
-rw-r--r-- | bootstrap.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bootstrap.php b/bootstrap.php new file mode 100644 index 0000000..329fef2 --- /dev/null +++ b/bootstrap.php @@ -0,0 +1,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; + } + } +}); |