summaryrefslogtreecommitdiffstats
path: root/Autoload.php.in
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-04-29 17:21:30 +0200
committerRemi Collet <fedora@famillecollet.com>2014-04-29 17:21:30 +0200
commitf5fddd10006229a1244feb46d96870d5cecd19e5 (patch)
tree3693002ae00a8404ef75c07d0baad01b1f76e91b /Autoload.php.in
parent2d5c7999501be2f9e0cac1afac6c20d0c1286991 (diff)
php-phpunit-PHP-CodeCoverage: 2.0.7, 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..98b2e99
--- /dev/null
+++ b/Autoload.php.in
@@ -0,0 +1,30 @@
+<?php
+/* inspired from Autoload.php from version 1.2 */
+
+require_once 'File/Iterator/Autoload.php';
+require_once 'PHP/Token/Stream/Autoload.php';
+require_once 'Text/Template/Autoload.php';
+require_once 'SebastianBergmann/Environment/autoload.php';
+require_once 'SebastianBergmann/Version/autoload.php';
+
+spl_autoload_register(
+ function ($class)
+ {
+ static $classes = NULL;
+ static $path = NULL;
+
+ if ($classes === NULL) {
+ $classes = array(
+ ___CLASSLIST___
+ );
+
+ $path = dirname(dirname(__FILE__));
+ }
+
+ $cn = strtolower($class);
+
+ if (isset($classes[$cn])) {
+ require $path . $classes[$cn];
+ }
+ }
+);