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