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