chore: complete update

This commit is contained in:
2025-07-17 16:24:20 +02:00
parent 899227b0a4
commit 64a7051137
1300 changed files with 85570 additions and 2756 deletions

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace App\Framework\Http;
/**
* Kontextobjekt, das durch die Middleware-Kette weitergegeben wird.
* Es enthält sowohl den ursprünglichen Request als auch eine optionale Response.
*/
final readonly class MiddlewareContext
{
public function __construct(
public Request $request,
public ?Response $response = null,
) {}
/**
* Erstellt einen neuen Kontext mit der gleichen Anfrage, aber einer anderen Antwort
*/
public function withResponse(Response $response): self
{
return new self($this->request, $response);
}
/**
* Prüft, ob bereits eine Response im Kontext vorhanden ist
*/
public function hasResponse(): bool
{
return $this->response !== null;
}
}