summaryrefslogtreecommitdiffstats
path: root/Autoload.php.in
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-04-29 17:21:58 +0200
committerRemi Collet <fedora@famillecollet.com>2014-04-29 17:21:58 +0200
commit66fe2bbde36da5a28ada1629ded03e413d727d6a (patch)
treeb7c250b96d5cfad1693341cc05d79b20dc3b4652 /Autoload.php.in
parent1e42dbacad9b958fb6e1a921dadef5422c4c4ed1 (diff)
php-phpunit-PHPUnit-MockObject: 2.0.5, sources from github
Diffstat (limited to 'Autoload.php.in')
-rw-r--r--Autoload.php.in24
1 files changed, 24 insertions, 0 deletions
diff --git a/Autoload.php.in b/Autoload.php.in
new file mode 100644
index 0000000..e79223b
--- /dev/null
+++ b/Autoload.php.in
@@ -0,0 +1,24 @@
+<?php
+/* Inspired from Autoload from version 1.2 */
+
+spl_autoload_register(
+ function ($class)
+ {
+ static $classes = NULL;
+ static $path = NULL;
+
+ if ($classes === NULL) {
+ $classes = array(
+ ___CLASSLIST___
+ );
+
+ $path = dirname(dirname(dirname(__FILE__)));
+ }
+
+ $cn = strtolower($class);
+
+ if (isset($classes[$cn])) {
+ require $path . $classes[$cn];
+ }
+ }
+);