summaryrefslogtreecommitdiffstats
path: root/php-hoa-file-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-06 13:09:29 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-06 13:09:29 +0200
commit3f2e560f38a9e87db8fd037f5118f425bbe1a000 (patch)
tree1cb43d7f16bbcc226808241e0b57a96ad2018523 /php-hoa-file-autoload.php
php-hoa-file: wip
Diffstat (limited to 'php-hoa-file-autoload.php')
-rw-r--r--php-hoa-file-autoload.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/php-hoa-file-autoload.php b/php-hoa-file-autoload.php
new file mode 100644
index 0000000..7b15e41
--- /dev/null
+++ b/php-hoa-file-autoload.php
@@ -0,0 +1,18 @@
+<?php
+/* Autoloader for hoa/file and its dependencies */
+
+$vendor = '/usr/share/php';
+
+// Dependencies
+foreach ([
+ $vendor . '/Hoa/Consistency/autoload.php' => true,
+ $vendor . '/Hoa/Event/autoload.php' => true,
+ $vendor . '/Hoa/Exception/autoload.php' => true,
+ $vendor . '/Hoa/Stream/autoload.php' => true,
+ $vendor . '/Hoa/Iterator/autoload.php' => true,
+ ] as $dep => $mandatory) {
+ if ($mandatory || file_exists($dep)) require_once($dep);
+}
+
+$fedoraHoaLoader->addNamespace('Hoa\\File\\', __DIR__, true);
+