summaryrefslogtreecommitdiffstats
path: root/php-hoa-zformat-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-06 13:57:23 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-06 13:57:23 +0200
commitce7ee7d2ccc31f02b2eea06ced017e812c069b28 (patch)
treec6a4692400711c9a8d75830bf89ad88ce5e226dc /php-hoa-zformat-autoload.php
php-hoa-zformat: wip
Diffstat (limited to 'php-hoa-zformat-autoload.php')
-rw-r--r--php-hoa-zformat-autoload.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/php-hoa-zformat-autoload.php b/php-hoa-zformat-autoload.php
new file mode 100644
index 0000000..17b920e
--- /dev/null
+++ b/php-hoa-zformat-autoload.php
@@ -0,0 +1,15 @@
+<?php
+/* Autoloader for hoa/zformat 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\\Zformat\\', __DIR__, true);
+