diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-04-06 13:41:08 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-04-06 13:41:08 +0200 |
commit | 21a416b42a387e5446399d583aea8fdf5ac9385f (patch) | |
tree | cff9551aa0f7f1d491bb6577a3534ace5697bf65 /php-hoa-console-autoload.php |
php-hoa-console: wip
Diffstat (limited to 'php-hoa-console-autoload.php')
-rw-r--r-- | php-hoa-console-autoload.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/php-hoa-console-autoload.php b/php-hoa-console-autoload.php new file mode 100644 index 0000000..9bb61d6 --- /dev/null +++ b/php-hoa-console-autoload.php @@ -0,0 +1,22 @@ +<?php +/* Autoloader for hoa/console and its dependencies */ + +$vendor = '/usr/share/php'; + +// Dependencies +foreach ([ + $vendor . '/Hoa/Consistency/autoload.php' => true, + $vendor . '/Hoa/Event/autoload.php' => true, + $vendor . '/Hoa/Exception/autoload.php' => true, + $vendor . '/Hoa/File/autoload.php' => true, + $vendor . '/Hoa/Protocol/autoload.php' => true, + $vendor . '/Hoa/Stream/autoload.php' => true, + $vendor . '/Hoa/Ustring/autoload.php' => true, + $vendor . '/Hoa/Dispatcher/autoload.php' => false, + $vendor . '/Hoa/Router/autoload.php' => false, + ] as $dep => $mandatory) { + if ($mandatory || file_exists($dep)) require_once($dep); +} + +$fedoraHoaLoader->addNamespace('Hoa\\Console\\', __DIR__, true); + |