diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-10-29 14:59:09 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-10-29 14:59:09 +0200 |
commit | 1010a7dbfb1edf99e56d2f402d7d15d094944048 (patch) | |
tree | e4903fb7548086e9c0d078711928f27605aac1dc /php-sabre-xml-autoload.php | |
parent | 36e2275711f557fea2a9948afb7ccc0404916b00 (diff) |
php-sabre-xml: switch from symfony/class-loader to fedora/autoloader
Diffstat (limited to 'php-sabre-xml-autoload.php')
-rw-r--r-- | php-sabre-xml-autoload.php | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/php-sabre-xml-autoload.php b/php-sabre-xml-autoload.php index d8eeb00..c50ba4e 100644 --- a/php-sabre-xml-autoload.php +++ b/php-sabre-xml-autoload.php @@ -1,26 +1,14 @@ <?php -/** - * Autoloader for sabre/xml and its dependencies - */ +/* Autoloader for sabre/xml and its dependencies */ -$vendorDir = '/usr/share/php'; +require_once '/usr/share/php/Fedora/Autoloader/autoload.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(); -} - -$fedoraClassLoader->addPrefix('Sabre\\Xml\\', dirname(dirname(__DIR__))); +\Fedora\Autoloader\Autoload::addPsr4('Sabre\\Xml\\', __DIR__); // Functions require_once __DIR__ . '/Deserializer/functions.php'; require_once __DIR__ . '/Serializer/functions.php'; // Dependencies -require_once $vendorDir . '/Sabre/Uri/autoload.php'; +require_once '/usr/share/php/Sabre/Uri/autoload.php'; |