summaryrefslogtreecommitdiffstats
path: root/php-composer-spdx-licenses-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-07-17 08:28:42 +0200
committerRemi Collet <fedora@famillecollet.com>2015-07-17 08:28:42 +0200
commit56a3b322f5d60945d2f11ec24d4169922a579f4a (patch)
tree0e210183d862d0ec00a098966ff735af0162259a /php-composer-spdx-licenses-autoload.php
php-composer-spdx-licenses: new package
Diffstat (limited to 'php-composer-spdx-licenses-autoload.php')
-rw-r--r--php-composer-spdx-licenses-autoload.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/php-composer-spdx-licenses-autoload.php b/php-composer-spdx-licenses-autoload.php
new file mode 100644
index 0000000..3d84359
--- /dev/null
+++ b/php-composer-spdx-licenses-autoload.php
@@ -0,0 +1,15 @@
+<?php
+/* Autoloader for composer/spdx-licenses 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('Composer\\Spdx\\', dirname(dirname(__DIR__)));