summaryrefslogtreecommitdiffstats
path: root/php-justinrainbow-json-schema-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-15 11:24:50 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-15 11:24:50 +0200
commit429ccf38f02f8aed5a3407d863ab5b3ec5f7ccd7 (patch)
tree6a8cee335716589d34ee72898481a72cf9eaec21 /php-justinrainbow-json-schema-autoload.php
php-justinrainbow-json-schema: 2.0.0 (new package)
Diffstat (limited to 'php-justinrainbow-json-schema-autoload.php')
-rw-r--r--php-justinrainbow-json-schema-autoload.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/php-justinrainbow-json-schema-autoload.php b/php-justinrainbow-json-schema-autoload.php
new file mode 100644
index 0000000..24540d8
--- /dev/null
+++ b/php-justinrainbow-json-schema-autoload.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Autoloader for justinrainbow/json-schema and its dependencies
+ */
+
+$vendorDir = '/usr/share/php';
+
+// Use Symfony PSR4 autoloader
+if (!isset($fedoraPsr4ClassLoader) || !($fedoraPsr4ClassLoader instanceof \Symfony\Component\ClassLoader\Psr4ClassLoader)) {
+ if (!class_exists('Symfony\\Component\\ClassLoader\\Psr4ClassLoader', false)) {
+ require_once '/usr/share/php/Symfony/Component/ClassLoader/Psr4ClassLoader.php';
+ }
+
+ $fedoraPsr4ClassLoader = new \Symfony\Component\ClassLoader\Psr4ClassLoader();
+ $fedoraPsr4ClassLoader->register(true);
+}
+
+$fedoraPsr4ClassLoader->addPrefix('JsonSchema\\', __DIR__);
+