diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-10-21 11:16:42 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-10-21 11:16:42 +0200 |
commit | 7fec0b1c264ed6146be606b666aba1adb909d24c (patch) | |
tree | e7c8ad4c33981ae59053f8e825830fa33a8f76d2 /phar-utils-autoload.php | |
parent | ceea8c8c6018e54aebb969bd0fb50b3584d81610 (diff) |
php-seld-phar-utils: fedora autoloader
Diffstat (limited to 'phar-utils-autoload.php')
-rw-r--r-- | phar-utils-autoload.php | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/phar-utils-autoload.php b/phar-utils-autoload.php index 0b8dbac..622780c 100644 --- a/phar-utils-autoload.php +++ b/phar-utils-autoload.php @@ -1,15 +1,9 @@ <?php /* Autoloader for seld/phar-utils and its dependencies */ -$vendorDir = '/usr/share/php'; -// Use Symfony autoloader -if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) { - if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) { - require_once $vendorDir . '/Symfony/Component/ClassLoader/ClassLoader.php'; - } - - $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader(); - $fedoraClassLoader->register(); +if (!class_exists('Fedora\\Autoloader\\Autoload', false)) { + require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; } -$fedoraClassLoader->addPrefix('Seld\\PharUtils\\', dirname(dirname(__DIR__))); +\Fedora\Autoloader\Autoload::addPsr4('Seld\\PharUtils\\', __DIR__); + |