diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:44:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:44:18 +0000 |
commit | 23be945fd2810ee82e3a23cbcd2352c9bda43d4f (patch) | |
tree | dd511b321f308264952cffb005a4288ea4e478e6 /library/vendor/iplx/Loader.php | |
parent | Initial commit. (diff) | |
download | icingaweb2-module-graphite-23be945fd2810ee82e3a23cbcd2352c9bda43d4f.tar.xz icingaweb2-module-graphite-23be945fd2810ee82e3a23cbcd2352c9bda43d4f.zip |
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/vendor/iplx/Loader.php')
-rw-r--r-- | library/vendor/iplx/Loader.php | 20 |
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; + } +}); |