summaryrefslogtreecommitdiffstats
path: root/php-hoa-router-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-06 14:08:39 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-06 14:08:39 +0200
commit1e1837af2843116a58a85958828bf6e71a18cea7 (patch)
treea601bbfeb7dbf2b7b386b269b11b6400875f12c4 /php-hoa-router-autoload.php
php-hoa-router: wip
Diffstat (limited to 'php-hoa-router-autoload.php')
-rw-r--r--php-hoa-router-autoload.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/php-hoa-router-autoload.php b/php-hoa-router-autoload.php
new file mode 100644
index 0000000..d89bd14
--- /dev/null
+++ b/php-hoa-router-autoload.php
@@ -0,0 +1,16 @@
+<?php
+/* Autoloader for hoa/router 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,
+ ] as $dep => $mandatory) {
+ if ($mandatory || file_exists($dep)) require_once($dep);
+}
+
+$fedoraHoaLoader->addNamespace('Hoa\\Router\\', __DIR__, true);
+