summaryrefslogtreecommitdiffstats
path: root/autoload.php.in
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-01-05 14:38:00 +0100
committerRemi Collet <fedora@famillecollet.com>2015-01-05 14:38:00 +0100
commitd1044842af5ad9489d8982e390615675c45340b0 (patch)
treef4a6caad76e14859ae4680eeaf4811cd153b14c6 /autoload.php.in
php-hamcrest: 1.2.0 - New package
Diffstat (limited to 'autoload.php.in')
-rw-r--r--autoload.php.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/autoload.php.in b/autoload.php.in
new file mode 100644
index 0000000..2112c71
--- /dev/null
+++ b/autoload.php.in
@@ -0,0 +1,17 @@
+<?php
+require __DIR__ . '/Hamcrest.php';
+
+spl_autoload_register(
+ function($class) {
+ static $classes = null;
+ if ($classes === null) {
+ $classes = array(
+ ___CLASSLIST___
+ );
+ }
+ $cn = strtolower($class);
+ if (isset($classes[$cn])) {
+ require __DIR__ . $classes[$cn];
+ }
+ }
+);