Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
18.18% |
4 / 22 |
|
25.00% |
2 / 8 |
CRAP | |
0.00% |
0 / 1 |
AjaxController | |
18.18% |
4 / 22 |
|
25.00% |
2 / 8 |
43.05 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
markdown | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
plugin_category_post | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
plugin_category_patch | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
plugin_category_delete | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
log_delete | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
feedback_delete | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
crash_report_delete | |
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\Ajax\AjaxCrashReportDeleteLogic; |
9 | use PeServer\App\Models\Domain\Page\Ajax\AjaxFeedbackDeleteLogic; |
10 | use PeServer\App\Models\Domain\Page\Ajax\AjaxLogFileDeleteLogic; |
11 | use PeServer\App\Models\Domain\Page\Ajax\AjaxMarkdownLogic; |
12 | use PeServer\App\Models\Domain\Page\Ajax\AjaxPluginCategoryCreateLogic; |
13 | use PeServer\App\Models\Domain\Page\Ajax\AjaxPluginCategoryDeleteLogic; |
14 | use PeServer\App\Models\Domain\Page\Ajax\AjaxPluginCategoryUpdateLogic; |
15 | use PeServer\Core\Http\HttpRequest; |
16 | use PeServer\Core\Mvc\ControllerArgument; |
17 | use PeServer\Core\Mvc\LogicCallMode; |
18 | use PeServer\Core\Mvc\Result\IActionResult; |
19 | |
20 | /** |
21 | * [PAGE] ページ内の Ajax 処理統括コントローラ。 |
22 | */ |
23 | final class AjaxController extends PageControllerBase |
24 | { |
25 | public function __construct(ControllerArgument $argument) |
26 | { |
27 | parent::__construct($argument); |
28 | } |
29 | |
30 | public function markdown(): IActionResult |
31 | { |
32 | $logic = $this->createLogic(AjaxMarkdownLogic::class); |
33 | $logic->run(LogicCallMode::Submit); |
34 | |
35 | return $this->data($logic->getContent()); |
36 | } |
37 | |
38 | public function plugin_category_post(): IActionResult |
39 | { |
40 | $logic = $this->createLogic(AjaxPluginCategoryCreateLogic::class); |
41 | $logic->run(LogicCallMode::Submit); |
42 | |
43 | return $this->data($logic->getContent()); |
44 | } |
45 | |
46 | public function plugin_category_patch(): IActionResult |
47 | { |
48 | $logic = $this->createLogic(AjaxPluginCategoryUpdateLogic::class); |
49 | $logic->run(LogicCallMode::Submit); |
50 | |
51 | return $this->data($logic->getContent()); |
52 | } |
53 | |
54 | public function plugin_category_delete(): IActionResult |
55 | { |
56 | $logic = $this->createLogic(AjaxPluginCategoryDeleteLogic::class); |
57 | $logic->run(LogicCallMode::Submit); |
58 | |
59 | return $this->data($logic->getContent()); |
60 | } |
61 | |
62 | public function log_delete(): IActionResult |
63 | { |
64 | $logic = $this->createLogic(AjaxLogFileDeleteLogic::class); |
65 | $logic->run(LogicCallMode::Submit); |
66 | |
67 | return $this->data($logic->getContent()); |
68 | } |
69 | |
70 | public function feedback_delete(): IActionResult |
71 | { |
72 | $logic = $this->createLogic(AjaxFeedbackDeleteLogic::class); |
73 | $logic->run(LogicCallMode::Submit); |
74 | |
75 | return $this->data($logic->getContent()); |
76 | } |
77 | |
78 | public function crash_report_delete(): IActionResult |
79 | { |
80 | $logic = $this->createLogic(AjaxCrashReportDeleteLogic::class); |
81 | $logic->run(LogicCallMode::Submit); |
82 | |
83 | return $this->data($logic->getContent()); |
84 | } |
85 | } |