summaryrefslogtreecommitdiffstats
path: root/php-hoa-locale-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-06 15:59:27 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-06 15:59:27 +0200
commit92eb852d6d970726d24bae764f0a632012e075b1 (patch)
tree7ba9b7274cbaf243e3e1f554fd9c419b59b894bd /php-hoa-locale-autoload.php
php-hoa-locale: wip
Diffstat (limited to 'php-hoa-locale-autoload.php')
-rw-r--r--php-hoa-locale-autoload.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/php-hoa-locale-autoload.php b/php-hoa-locale-autoload.php
new file mode 100644
index 0000000..a95679c
--- /dev/null
+++ b/php-hoa-locale-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/Http/autoload.php' => true,
+ ] as $dep => $mandatory) {
+ if ($mandatory || file_exists($dep)) require_once($dep);
+}
+
+$fedoraHoaLoader->addNamespace('Hoa\\Locale\\', __DIR__, true);
+