Router, Logger, Bump v1.5

This commit is contained in:
2022-05-31 16:14:49 +02:00
parent 5bb0d1419f
commit 658157167e
33 changed files with 968 additions and 267 deletions

View File

@@ -5,7 +5,7 @@ if (is_file($autoLoad)) {
require_once $autoLoad;
}
define("WEBBASE_VERSION", "1.4.5");
define("WEBBASE_VERSION", "1.5.0");
spl_autoload_extensions(".php");
spl_autoload_register(function($class) {
@@ -215,6 +215,15 @@ function getClassPath($class, string $suffix = ".class"): string {
return "core/$path$suffix.php";
}
function getClassName($class, bool $short = true): string {
$reflection = new \ReflectionClass($class);
if ($short) {
return $reflection->getShortName();
} else {
return $reflection->getName();
}
}
function createError($msg) {
return json_encode(array("success" => false, "msg" => $msg));
}