This commit is contained in:
2026-04-17 16:30:52 +08:00
parent 16b8df159a
commit 4cfd04c988
7 changed files with 346 additions and 22 deletions
+28
View File
@@ -32,6 +32,10 @@ class Handler implements RequestHandlerInterface
*/
protected array $middlewares = [];
protected ?string $sourceFile = null;
protected string $sourceKind = 'attribute';
/**
* @param array|Closure $handler
* @param array $parameters
@@ -124,6 +128,30 @@ class Handler implements RequestHandlerInterface
}
public function setSourceFile(?string $sourceFile): void
{
$this->sourceFile = $sourceFile;
}
public function getSourceFile(): ?string
{
return $this->sourceFile;
}
public function setSourceKind(string $sourceKind): void
{
$this->sourceKind = $sourceKind;
}
public function getSourceKind(): string
{
return $this->sourceKind;
}
/**
* @param ServerRequestInterface $request
* @return ResponseInterface