diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-04-06 14:29:33 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-04-06 14:29:33 +0200 |
commit | aca88bcadd173f61ba2ebbf56bd2635e7900c49a (patch) | |
tree | cd4f0ba7e89d7d58bcef9bb5b8c85cb4b738dcef /php-hoa-dispatcher-autoload.php |
php-hoa-dispatcher: wip
Diffstat (limited to 'php-hoa-dispatcher-autoload.php')
-rw-r--r-- | php-hoa-dispatcher-autoload.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/php-hoa-dispatcher-autoload.php b/php-hoa-dispatcher-autoload.php new file mode 100644 index 0000000..18b1f94 --- /dev/null +++ b/php-hoa-dispatcher-autoload.php @@ -0,0 +1,18 @@ +<?php +/* Autoloader for hoa/dispatcher and its dependencies */ + +$vendor = '/usr/share/php'; + +// Dependencies +foreach ([ + $vendor . '/Hoa/Consistency/autoload.php' => true, + $vendor . '/Hoa/Exception/autoload.php' => true, + $vendor . '/Hoa/Zformat/autoload.php' => true, + $vendor . '/Hoa/Router/autoload.php' => false, + $vendor . '/Hoa/View/autoload.php' => false, + ] as $dep => $mandatory) { + if ($mandatory || file_exists($dep)) require_once($dep); +} + +$fedoraHoaLoader->addNamespace('Hoa\\Dispatcher\\', __DIR__, true); + |