Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 7 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
DevelopmentApiController | |
0.00% |
0 / 7 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
initialize | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
administrator | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\App\Controllers\Api; |
6 | |
7 | use PeServer\Core\Http\HttpRequest; |
8 | use PeServer\Core\Mvc\Result\IActionResult; |
9 | use PeServer\Core\Mvc\LogicCallMode; |
10 | use PeServer\Core\Mvc\ControllerArgument; |
11 | use PeServer\App\Controllers\Api\ApiControllerBase; |
12 | use PeServer\App\Models\Domain\Api\DevelopmentApi\DevelopmentApiInitializeLogic; |
13 | use PeServer\App\Models\Domain\Api\DevelopmentApi\DevelopmentApiAdministratorLogic; |
14 | |
15 | /** |
16 | * [API] 開発用コントローラ。 |
17 | * |
18 | * こいつ自体は何もしないけどミドルウェアが `localhost` 以外を弾く。 |
19 | */ |
20 | final class DevelopmentApiController extends ApiControllerBase |
21 | { |
22 | public function __construct(ControllerArgument $argument) |
23 | { |
24 | parent::__construct($argument); |
25 | } |
26 | |
27 | public function initialize(): IActionResult |
28 | { |
29 | $logic = $this->createLogic(DevelopmentApiInitializeLogic::class); |
30 | $logic->run(LogicCallMode::Submit); |
31 | |
32 | return $this->data($logic->getContent()); |
33 | } |
34 | |
35 | public function administrator(): IActionResult |
36 | { |
37 | $logic = $this->createLogic(DevelopmentApiAdministratorLogic::class); |
38 | $logic->run(LogicCallMode::Submit); |
39 | |
40 | return $this->data($logic->getContent()); |
41 | } |
42 | } |