diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-04-06 17:02:14 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-04-06 17:02:14 +0200 |
commit | 278834effbfc977bc7dfa545b20fb12184afd4ce (patch) | |
tree | 9e9b093b1817c619996af49e626fb496c2a603bd /php-hoa-compiler-autoload.php |
php-hoa-compiler: wip
Diffstat (limited to 'php-hoa-compiler-autoload.php')
-rw-r--r-- | php-hoa-compiler-autoload.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/php-hoa-compiler-autoload.php b/php-hoa-compiler-autoload.php new file mode 100644 index 0000000..9fafec9 --- /dev/null +++ b/php-hoa-compiler-autoload.php @@ -0,0 +1,21 @@ +<?php +/* Autoloader for hoa/compiler and its dependencies */ + +$vendor = '/usr/share/php'; + +// Dependencies +foreach ([ + $vendor . '/Hoa/Consistency/autoload.php' => true, + $vendor . '/Hoa/Exception/autoload.php' => true, + $vendor . '/Hoa/File/autoload.php' => true, + $vendor . '/Hoa/Iterator/autoload.php' => true, + $vendor . '/Hoa/Math/autoload.php' => true, + $vendor . '/Hoa/Protocol/autoload.php' => true, + $vendor . '/Hoa/Regex/autoload.php' => true, + $vendor . '/Hoa/Visitor/autoload.php' => true, + ] as $dep => $mandatory) { + if ($mandatory || file_exists($dep)) require_once($dep); +} + +$fedoraHoaLoader->addNamespace('Hoa\\Compiler\\', __DIR__, true); + |