summaryrefslogtreecommitdiffstats
path: root/php-hoa-math-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-06 16:31:51 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-06 16:31:51 +0200
commitd3b8b294aece4273d9455b8dae6ed75c2a122a50 (patch)
tree530e8f88d8607b8325dfddb7725b7e7d6ddf9f55 /php-hoa-math-autoload.php
php-hoa-math: wip
Diffstat (limited to 'php-hoa-math-autoload.php')
-rw-r--r--php-hoa-math-autoload.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/php-hoa-math-autoload.php b/php-hoa-math-autoload.php
new file mode 100644
index 0000000..c721ebe
--- /dev/null
+++ b/php-hoa-math-autoload.php
@@ -0,0 +1,19 @@
+<?php
+/* Autoloader for hoa/math and its dependencies */
+
+$vendor = '/usr/share/php';
+
+// Dependencies
+foreach ([
+ $vendor . '/Hoa/Compiler/autoload.php' => true,
+ $vendor . '/Hoa/Consistency/autoload.php' => true,
+ $vendor . '/Hoa/Exception/autoload.php' => true,
+ $vendor . '/Hoa/Iterator/autoload.php' => true,
+ $vendor . '/Hoa/Protocol/autoload.php' => true,
+ $vendor . '/Hoa/Zformat/autoload.php' => true,
+ ] as $dep => $mandatory) {
+ if ($mandatory || file_exists($dep)) require_once($dep);
+}
+
+$fedoraHoaLoader->addNamespace('Hoa\\Math\\', __DIR__, true);
+