diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-10-28 16:04:00 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-10-28 16:04:00 +0200 |
commit | 7212e7a23961c77170426ff7f84602f534a74670 (patch) | |
tree | 10de30f01c04db9536808bbc2fae7adab677c89a /php-solarium-autoload.php | |
parent | d37dbdeaf069b31677340cb1495b1590e72ef13e (diff) |
php-solarium: 3.7.0
Diffstat (limited to 'php-solarium-autoload.php')
-rw-r--r-- | php-solarium-autoload.php | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/php-solarium-autoload.php b/php-solarium-autoload.php index b5fede0..f3c802d 100644 --- a/php-solarium-autoload.php +++ b/php-solarium-autoload.php @@ -1,22 +1,13 @@ <?php /* Autoloader for solarium/solarium 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'; - } +require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; - $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader(); - $fedoraClassLoader->register(); -} +\Fedora\Autoloader\Autoload::addPsr4('Solarium\\', __DIR__); +\Fedora\Autoloader\Dependencies::required(array( + array( + '/usr/share/php/Symfony/Component/autoload.php', + '/usr/share/php/Symfony/autoload.php', + ), +)); -$fedoraClassLoader->addPrefix('Solarium\\', dirname(__DIR__)); - -// dependencies -if (file_exists($vendorDir . '/Symfony/Component/autoload.php')) { - require_once $vendorDir . '/Symfony/Component/autoload.php'; -} else { - $fedoraClassLoader->addPrefix('Symfony\\Component\\', $vendorDir); -} |