summaryrefslogtreecommitdiffstats
path: root/php-sabre-event-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-29 15:11:10 +0200
committerRemi Collet <fedora@famillecollet.com>2016-10-29 15:11:10 +0200
commitc58df5b7f26d0159ebf23cce6ff4a524ff2260d3 (patch)
treeac133fdcb8c85307dabf667d82428755ad813078 /php-sabre-event-autoload.php
parent44400fb1171e62638a340fc107e0af1a00395ab9 (diff)
php-sabre-event: switch from symfony/class-loader to fedora/autoloader
Diffstat (limited to 'php-sabre-event-autoload.php')
-rw-r--r--php-sabre-event-autoload.php17
1 files changed, 3 insertions, 14 deletions
diff --git a/php-sabre-event-autoload.php b/php-sabre-event-autoload.php
index 7ed3cf8..aecf027 100644
--- a/php-sabre-event-autoload.php
+++ b/php-sabre-event-autoload.php
@@ -1,18 +1,7 @@
<?php
-/**
- * Autoloader for sabre/event and its dependencies
- */
+/* Autoloader for sabre/event 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';
- }
+\Fedora\Autoloader\Autoload::addPsr4('Sabre\\Event\\', __DIR__);
- $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
- $fedoraClassLoader->register();
-}
-
-$fedoraClassLoader->addPrefix('Sabre\\Event\\', dirname(dirname(__DIR__)));