summaryrefslogtreecommitdiffstats
path: root/php-sabre-vobject-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-03-16 12:56:26 +0100
committerRemi Collet <fedora@famillecollet.com>2016-03-16 12:56:26 +0100
commitbe9c16ffae597f03473b6eb1c7b6771731f50c60 (patch)
treef87f080ece9bd39f18d5b961486d4ea94c02cbb3 /php-sabre-vobject-autoload.php
parent842aa910e681965ee24b173af82df7a60ecedc4f (diff)
php-sabre-vobject: 3.4.6 (synced with Fedora)
Diffstat (limited to 'php-sabre-vobject-autoload.php')
-rw-r--r--php-sabre-vobject-autoload.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/php-sabre-vobject-autoload.php b/php-sabre-vobject-autoload.php
new file mode 100644
index 0000000..aa94f26
--- /dev/null
+++ b/php-sabre-vobject-autoload.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Autoloader for sabre/vobject 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';
+ }
+
+ $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
+ $fedoraClassLoader->register();
+}
+
+$fedoraClassLoader->addPrefix('Sabre\\VObject\\', dirname(dirname(__DIR__)));