summaryrefslogtreecommitdiffstats
path: root/bootstrap.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-10-06 18:22:00 +0200
committerRemi Collet <fedora@famillecollet.com>2012-10-06 18:22:00 +0200
commitdc054e3e72c9ecda81c16a9a4d33359eab43dfa6 (patch)
treeb5bda160607c7b66ff2a9bff2b9f0501029f786a /bootstrap.php
parentbfaf4e607e0a8d7fac7f34bf784a69a70f2d3c92 (diff)
php-symfony2-OptionsResolver minor fixes
Diffstat (limited to 'bootstrap.php')
-rw-r--r--bootstrap.php24
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;
+ }
+ }
+});