summaryrefslogtreecommitdiffstats
path: root/php-hoa-compiler-autoload.php
diff options
context:
space:
mode:
Diffstat (limited to 'php-hoa-compiler-autoload.php')
-rw-r--r--php-hoa-compiler-autoload.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/php-hoa-compiler-autoload.php b/php-hoa-compiler-autoload.php
new file mode 100644
index 0000000..9fafec9
--- /dev/null
+++ b/php-hoa-compiler-autoload.php
@@ -0,0 +1,21 @@
+<?php
+/* Autoloader for hoa/compiler and its dependencies */
+
+$vendor = '/usr/share/php';
+
+// Dependencies
+foreach ([
+ $vendor . '/Hoa/Consistency/autoload.php' => true,
+ $vendor . '/Hoa/Exception/autoload.php' => true,
+ $vendor . '/Hoa/File/autoload.php' => true,
+ $vendor . '/Hoa/Iterator/autoload.php' => true,
+ $vendor . '/Hoa/Math/autoload.php' => true,
+ $vendor . '/Hoa/Protocol/autoload.php' => true,
+ $vendor . '/Hoa/Regex/autoload.php' => true,
+ $vendor . '/Hoa/Visitor/autoload.php' => true,
+ ] as $dep => $mandatory) {
+ if ($mandatory || file_exists($dep)) require_once($dep);
+}
+
+$fedoraHoaLoader->addNamespace('Hoa\\Compiler\\', __DIR__, true);
+