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