summaryrefslogtreecommitdiffstats
path: root/php-league-flysystem-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-01-14 09:43:43 +0100
committerRemi Collet <fedora@famillecollet.com>2016-01-14 09:43:43 +0100
commit6e576f89b0b29f1762375bf1008022c8236a6529 (patch)
tree8aa4f7d154f34a834fc7955601b8a4aa90af3c92 /php-league-flysystem-autoload.php
php-league-flysystem: 1.0.16 - New package
Diffstat (limited to 'php-league-flysystem-autoload.php')
-rw-r--r--php-league-flysystem-autoload.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/php-league-flysystem-autoload.php b/php-league-flysystem-autoload.php
new file mode 100644
index 0000000..dcbdda2
--- /dev/null
+++ b/php-league-flysystem-autoload.php
@@ -0,0 +1,15 @@
+<?php
+/* Autoloader for league/flysystem 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('League\\Flysystem\\', dirname(dirname(__DIR__)));