From 92a7b53a62dcae52ab6d5536be600a104ee20095 Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Sat, 6 Oct 2012 18:39:12 +0200
Subject: php-symfony2-Filesystem: build, with tests

---
 bootstrap.php | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 bootstrap.php

(limited to 'bootstrap.php')

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;        
+        }
+    }
+});
-- 
cgit