summaryrefslogtreecommitdiffstats
path: root/php-hoa-dispatcher-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-06 14:29:33 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-06 14:29:33 +0200
commitaca88bcadd173f61ba2ebbf56bd2635e7900c49a (patch)
treecd4f0ba7e89d7d58bcef9bb5b8c85cb4b738dcef /php-hoa-dispatcher-autoload.php
php-hoa-dispatcher: wip
Diffstat (limited to 'php-hoa-dispatcher-autoload.php')
-rw-r--r--php-hoa-dispatcher-autoload.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/php-hoa-dispatcher-autoload.php b/php-hoa-dispatcher-autoload.php
new file mode 100644
index 0000000..18b1f94
--- /dev/null
+++ b/php-hoa-dispatcher-autoload.php
@@ -0,0 +1,18 @@
+<?php
+/* Autoloader for hoa/dispatcher and its dependencies */
+
+$vendor = '/usr/share/php';
+
+// Dependencies
+foreach ([
+ $vendor . '/Hoa/Consistency/autoload.php' => true,
+ $vendor . '/Hoa/Exception/autoload.php' => true,
+ $vendor . '/Hoa/Zformat/autoload.php' => true,
+ $vendor . '/Hoa/Router/autoload.php' => false,
+ $vendor . '/Hoa/View/autoload.php' => false,
+ ] as $dep => $mandatory) {
+ if ($mandatory || file_exists($dep)) require_once($dep);
+}
+
+$fedoraHoaLoader->addNamespace('Hoa\\Dispatcher\\', __DIR__, true);
+