Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 16 |
|
0.00% |
0 / 6 |
CRAP | |
0.00% |
0 / 1 |
ToolController | |
0.00% |
0 / 16 |
|
0.00% |
0 / 6 |
42 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
index | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
base64_get | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
base64_post | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
json_get | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
json_post | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\App\Controllers\Page; |
6 | |
7 | use PeServer\App\Controllers\Page\PageControllerBase; |
8 | use PeServer\App\Models\Domain\Page\Tool\ToolBase64Logic; |
9 | use PeServer\App\Models\Domain\Page\Tool\ToolJsonLogic; |
10 | use PeServer\App\Models\Domain\Page\Tool\ToolIndexLogic; |
11 | use PeServer\Core\Mvc\ControllerArgument; |
12 | use PeServer\Core\Mvc\LogicCallMode; |
13 | use PeServer\Core\Mvc\Result\IActionResult; |
14 | |
15 | /** |
16 | * [PAGE] ツールコントローラ。 |
17 | */ |
18 | final class ToolController extends PageControllerBase |
19 | { |
20 | public function __construct(ControllerArgument $argument) |
21 | { |
22 | parent::__construct($argument); |
23 | } |
24 | |
25 | #region function |
26 | |
27 | public function index(): IActionResult |
28 | { |
29 | $logic = $this->createLogic(ToolIndexLogic::class); |
30 | $logic->run(LogicCallMode::Initialize); |
31 | |
32 | return $this->view('index', $logic->getViewData()); |
33 | } |
34 | |
35 | public function base64_get(): IActionResult |
36 | { |
37 | $logic = $this->createLogic(ToolBase64Logic::class); |
38 | $logic->run(LogicCallMode::Initialize); |
39 | |
40 | return $this->view('base64', $logic->getViewData()); |
41 | } |
42 | |
43 | public function base64_post(): IActionResult |
44 | { |
45 | $logic = $this->createLogic(ToolBase64Logic::class); |
46 | $logic->run(LogicCallMode::Submit); |
47 | |
48 | return $this->view('base64', $logic->getViewData()); |
49 | } |
50 | |
51 | public function json_get(): IActionResult |
52 | { |
53 | $logic = $this->createLogic(ToolJsonLogic::class); |
54 | $logic->run(LogicCallMode::Initialize); |
55 | |
56 | return $this->view('json', $logic->getViewData()); |
57 | } |
58 | |
59 | public function json_post(): IActionResult |
60 | { |
61 | $logic = $this->createLogic(ToolJsonLogic::class); |
62 | $logic->run(LogicCallMode::Submit); |
63 | |
64 | return $this->view('json', $logic->getViewData()); |
65 | } |
66 | |
67 | #endregion |
68 | } |