summaryrefslogtreecommitdiffstats
path: root/vendor/riimu/kit-pathjoin/src/autoload.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/riimu/kit-pathjoin/src/autoload.php')
-rw-r--r--vendor/riimu/kit-pathjoin/src/autoload.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/riimu/kit-pathjoin/src/autoload.php b/vendor/riimu/kit-pathjoin/src/autoload.php
new file mode 100644
index 000000000..bc8572d6d
--- /dev/null
+++ b/vendor/riimu/kit-pathjoin/src/autoload.php
@@ -0,0 +1,12 @@
+<?php
+
+// Autoloader for loading the library when composer is not available
+spl_autoload_register(function ($class) {
+ if (strncmp($class, $ns = 'Riimu\\Kit\\PathJoin\\', strlen($ns)) === 0) {
+ $file = substr_replace($class, '\\', 0, strlen($ns)) . '.php';
+ $path = __DIR__ . str_replace('\\', DIRECTORY_SEPARATOR, $file);
+ if (file_exists($path)) {
+ require $path;
+ }
+ }
+});