Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
RouteSetting
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace PeServer\Core\Mvc;
6
7use PeServer\Core\Mvc\Middleware\IMiddleware;
8use PeServer\Core\Mvc\Middleware\IShutdownMiddleware;
9
10/**
11 * ルーティングの設定。
12 */
13readonly class RouteSetting
14{
15    /**
16     * 生成。
17     *
18     * @param array<IMiddleware|class-string<IMiddleware>> $globalMiddleware 全体適用ミドルウェア。
19     * @param array<IMiddleware|class-string<IMiddleware>> $actionMiddleware アクション適用ミドルウェア。
20     * @param array<IShutdownMiddleware|class-string<IShutdownMiddleware>> $globalShutdownMiddleware 全体適用応答完了後ミドルウェア。
21     * @param array<IShutdownMiddleware|class-string<IShutdownMiddleware>> $actionShutdownMiddleware アクション適用応答完了後ミドルウェア。
22     * @param Route[] $routes ルーティング一覧。
23     */
24    public function __construct(
25        public array $globalMiddleware,
26        public array $actionMiddleware,
27        public array $globalShutdownMiddleware,
28        public array $actionShutdownMiddleware,
29        public array $routes
30    ) {
31    }
32}