diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:21:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:21:16 +0000 |
commit | 2e582fe0b8b6a8e67982ddb84935db1bd3b401fe (patch) | |
tree | dd511b321f308264952cffb005a4288ea4e478e6 /library/vendor/Psr/Loader.php | |
parent | Initial commit. (diff) | |
download | icingaweb2-module-graphite-2e582fe0b8b6a8e67982ddb84935db1bd3b401fe.tar.xz icingaweb2-module-graphite-2e582fe0b8b6a8e67982ddb84935db1bd3b401fe.zip |
Adding upstream version 1.2.2.upstream/1.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/vendor/Psr/Loader.php')
-rw-r--r-- | library/vendor/Psr/Loader.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/library/vendor/Psr/Loader.php b/library/vendor/Psr/Loader.php new file mode 100644 index 0000000..45c78af --- /dev/null +++ b/library/vendor/Psr/Loader.php @@ -0,0 +1,21 @@ +<?php +/* Icinga Web 2 Elasticsearch Module (c) 2017 Icinga Development Team | GPLv2+ */ + +spl_autoload_register(function ($class) { + $prefix = 'Psr\\'; + $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; + } +}); |