summaryrefslogtreecommitdiffstats
path: root/php-justinrainbow-json-schema-autoload.php
diff options
context:
space:
mode:
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__);
+