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