- move elixForms API logic to specific folder
- move everything else under Api folder
This commit is contained in:
2026-07-13 17:34:43 +02:00
parent 1766057cb9
commit 661e2db8b1
27 changed files with 294 additions and 129 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace Core;
class Request {
public function method() {
return $_SERVER['REQUEST_METHOD'];
}
public function path() {
return strtok($_SERVER['REQUEST_URI'], '?');
}
public function body() {
return json_decode(file_get_contents('php://input'), true);
}
public function query() {
return $_GET;
}
public function header(string $name): ?string
{
$key = 'HTTP_' . strtoupper(str_replace('-', '_', $name));
return $_SERVER[$key] ?? null;
}
}