Add Regex to extra field

This commit is contained in:
2020-07-15 15:05:54 +02:00
parent 35637ddc37
commit 4f9a9e063a
3 changed files with 16 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
<?php
define("WEBBASE_VERSION", "1.0.1");
define("WEBBASE_VERSION", "1.0.2");
function getProtocol() {
return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https" : "http";
@@ -157,3 +157,13 @@ function serveStatic(string $webRoot, string $file) {
return "";
}
function parseClass($class) {
if (!startsWith($class, "\\")) {
$class = "\\$class";
}
$parts = explode("\\", $class);
$parts = array_map('ucfirst', $parts);
return implode("\\", $parts);
}