summaryrefslogtreecommitdiffstats
path: root/php-jeremeamia-superclosure-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-09-01 15:23:32 +0200
committerRemi Collet <fedora@famillecollet.com>2015-09-01 15:23:32 +0200
commit551c3cd382f02fe3195be181ed7ab4718efd7e38 (patch)
treead14ad2aeff28f4c1726620da8f459f99561a96e /php-jeremeamia-superclosure-autoload.php
php-jeremeamia-superclosure: 2.1.0 - New package
Diffstat (limited to 'php-jeremeamia-superclosure-autoload.php')
-rw-r--r--php-jeremeamia-superclosure-autoload.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/php-jeremeamia-superclosure-autoload.php b/php-jeremeamia-superclosure-autoload.php
new file mode 100644
index 0000000..059faf9
--- /dev/null
+++ b/php-jeremeamia-superclosure-autoload.php
@@ -0,0 +1,18 @@
+<?php
+/* Autoloader for jeremeamia/superclosure 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('SuperClosure\\', dirname(__DIR__));
+
+// Dependencies
+require_once $vendorDir . '/PhpParser/autoload.php';