summaryrefslogtreecommitdiffstats
path: root/library/vendor/iplx/Loader.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--library/vendor/iplx/Loader.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/library/vendor/iplx/Loader.php b/library/vendor/iplx/Loader.php
new file mode 100644
index 0000000..5a6c9c0
--- /dev/null
+++ b/library/vendor/iplx/Loader.php
@@ -0,0 +1,20 @@
+<?php
+
+spl_autoload_register(function ($class) {
+ $prefix = 'iplx\\';
+ $len = strlen($prefix);
+
+ $baseDir = __DIR__ . '/';
+
+ if (strncmp($prefix, $class, $len) !== 0) {
+ return;
+ }
+
+ $relative = substr($class, $len);
+
+ $file = $baseDir . str_replace('\\', '/', $relative) . '.php';
+
+ if (file_exists($file)) {
+ require $file;
+ }
+});