summaryrefslogtreecommitdiffstats
path: root/php-hoa-xml-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-09 10:08:49 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-09 10:08:49 +0200
commit9bdacb33849c58c86f9679c15dd0de008d195b43 (patch)
treef607840a7a98d2b6a427f7c986a2827169546d32 /php-hoa-xml-autoload.php
php-hoa-xml: 1.16.04.05 (new package, wip)
Diffstat (limited to 'php-hoa-xml-autoload.php')
-rw-r--r--php-hoa-xml-autoload.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/php-hoa-xml-autoload.php b/php-hoa-xml-autoload.php
new file mode 100644
index 0000000..1562fe0
--- /dev/null
+++ b/php-hoa-xml-autoload.php
@@ -0,0 +1,19 @@
+<?php
+/* Autoloader for hoa/xml and its dependencies */
+
+$vendor = '/usr/share/php';
+
+// Dependencies
+foreach ([
+ $vendor . '/Hoa/Consistency/autoload.php' => true,
+ $vendor . '/Hoa/Compiler/autoload.php' => true,
+ $vendor . '/Hoa/Exception/autoload.php' => true,
+ $vendor . '/Hoa/File/autoload.php' => true,
+ $vendor . '/Hoa/Stream/autoload.php' => true,
+ $vendor . '/Hoa/Stringbuffer/autoload.php' => true,
+ ] as $dep => $mandatory) {
+ if ($mandatory || file_exists($dep)) require_once($dep);
+}
+
+$fedoraHoaLoader->addNamespace('Hoa\\Xml\\', __DIR__, true);
+