поиск+доставка

This commit is contained in:
Alisa
2026-06-07 13:12:42 +03:00
parent 65d182b4af
commit ee753429e2
20 changed files with 3429 additions and 91 deletions
+5
View File
@@ -18,6 +18,11 @@ final class Router
$this->routes[] = ['method' => 'GET', 'pattern' => $pattern, 'handler' => $handler];
}
public function post(string $pattern, callable $handler): void
{
$this->routes[] = ['method' => 'POST', 'pattern' => $pattern, 'handler' => $handler];
}
public function dispatch(string $method, string $uri): void
{
$path = parse_url($uri, PHP_URL_PATH) ?: '/';