summaryrefslogtreecommitdiffstats
path: root/Autoload.php.in
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-05-04 09:49:16 +0200
committerRemi Collet <fedora@famillecollet.com>2014-05-04 09:49:16 +0200
commitd3a601cc8f12dce102001068388a51aff9a84751 (patch)
tree691c2221c416b2e8dd6a23ff8ccdb2093bd73852 /Autoload.php.in
parent8a874ca5188f6a6a4a829b2472484b56bfa45b54 (diff)
php-phpunit-phpdcd: 1.0.2, sources from github
Diffstat (limited to 'Autoload.php.in')
-rw-r--r--Autoload.php.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/Autoload.php.in b/Autoload.php.in
new file mode 100644
index 0000000..c7f66e0
--- /dev/null
+++ b/Autoload.php.in
@@ -0,0 +1,30 @@
+<?php
+/* Inspired from autoload from version 0.9.3 */
+
+require_once 'SebastianBergmann/FinderFacade/autoload.php';
+require_once 'SebastianBergmann/Version/autoload.php';
+require_once 'PHP/Token/Stream/Autoload.php';
+require_once 'PHP/Timer/Autoload.php';
+require_once 'Symfony/Component/Console/autoloader.php';
+
+spl_autoload_register(
+ function ($class)
+ {
+ static $classes = NULL;
+ static $path = NULL;
+
+ if ($classes === NULL) {
+ $classes = array(
+ ___CLASSLIST___
+ );
+
+ $path = dirname(__FILE__);
+ }
+
+ $cn = strtolower($class);
+
+ if (isset($classes[$cn])) {
+ require $path . $classes[$cn];
+ }
+ }
+);