summaryrefslogtreecommitdiffstats
path: root/php-hoa-iterator-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-06 12:55:40 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-06 12:55:40 +0200
commit6a044d0eb34456d8f4031ae2489f09d6bf8161b7 (patch)
tree34d2cdbe27654cb51d909594a3dafbd8e66127c7 /php-hoa-iterator-autoload.php
php-hoa-iterator: wip
Diffstat (limited to 'php-hoa-iterator-autoload.php')
-rw-r--r--php-hoa-iterator-autoload.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/php-hoa-iterator-autoload.php b/php-hoa-iterator-autoload.php
new file mode 100644
index 0000000..76430ba
--- /dev/null
+++ b/php-hoa-iterator-autoload.php
@@ -0,0 +1,15 @@
+<?php
+/* Autoloader for hoa/stream 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\\Iterator\\', __DIR__, true);
+