summaryrefslogtreecommitdiffstats
path: root/php-sabre-xml-autoload.php
diff options
context:
space:
mode:
Diffstat (limited to 'php-sabre-xml-autoload.php')
-rw-r--r--php-sabre-xml-autoload.php20
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';