Pipeline
in package
FinalYes
ミドルウェア列 → Action を onion 状に合成して実行するパイプライン。
エントリ(setup/*.php)は「どの middleware を、どの Action の前に通すか」を宣言的に組み立て、 handle() で Request を流して Response を得るだけになる。
Table of Contents
Properties
- $action : mixed
- $middlewares : array<string|int, mixed>
Methods
- __construct() : mixed
- handle() : Response
Properties
$action
private
mixed
$action
$middlewares read-only
private
array<string|int, mixed>
$middlewares
Methods
__construct()
public
__construct(array<int, Middleware> $middlewares, callable(Request): Response $action) : mixed
Parameters
- $middlewares : array<int, Middleware>
-
実行順(先頭が最外)
- $action : callable(Request): Response
-
最終段(Action)
handle()
public
handle(Request $request) : Response
Parameters
- $request : Request