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