new API structure

This commit is contained in:
2020-06-20 20:13:51 +02:00
parent a3ef5ac084
commit 9fc9a2a43f
29 changed files with 1332 additions and 1322 deletions

View File

@@ -87,7 +87,14 @@
function getClassPath($class, $suffix=true) {
$path = str_replace('\\', '/', $class);
if (startsWith($path, "/")) $path = substr($path, 1);
$path = array_values(array_filter(explode("/", $path)));
if (strcasecmp($path[0], "api") === 0 && count($path) > 2 && strcasecmp($path[1], "Parameter") !== 0) {
$path = "Api/" . $path[1] . "API";
} else {
$path = implode("/", $path);
}
$suffix = ($suffix ? ".class" : "");
return "core/$path$suffix.php";
}