1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* MikoPBX - free phone system for small business |
5
|
|
|
* Copyright © 2017-2023 Alexey Portnov and Nikolay Beketov |
6
|
|
|
* |
7
|
|
|
* This program is free software: you can redistribute it and/or modify |
8
|
|
|
* it under the terms of the GNU General Public License as published by |
9
|
|
|
* the Free Software Foundation; either version 3 of the License, or |
10
|
|
|
* (at your option) any later version. |
11
|
|
|
* |
12
|
|
|
* This program is distributed in the hope that it will be useful, |
13
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
14
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15
|
|
|
* GNU General Public License for more details. |
16
|
|
|
* |
17
|
|
|
* You should have received a copy of the GNU General Public License along with this program. |
18
|
|
|
* If not, see <https://www.gnu.org/licenses/>. |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
namespace MikoPBX\PBXCoreREST\Controllers\Modules; |
22
|
|
|
|
23
|
|
|
use MikoPBX\PBXCoreREST\Controllers\BaseController; |
24
|
|
|
use MikoPBX\PBXCoreREST\Lib\ModulesManagementProcessor; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* Handles the GET request for module manipulation actions. |
28
|
|
|
* |
29
|
|
|
* @RoutePrefix("/pbxcore/api/modules/core") |
30
|
|
|
*/ |
31
|
|
|
class CoreGetController extends BaseController |
32
|
|
|
{ |
33
|
|
|
/** |
34
|
|
|
* Handles the call to different actions based on the action name for core |
35
|
|
|
* |
36
|
|
|
* @param string $actionName The name of the action |
37
|
|
|
* |
38
|
|
|
* Retrieves available modules on MIKO repository. |
39
|
|
|
* @Post("/getAvailableModules") |
40
|
|
|
* |
41
|
|
|
* @return void |
42
|
|
|
*/ |
43
|
|
|
public function callAction(string $actionName): void |
44
|
|
|
{ |
45
|
|
|
$this->sendRequestToBackendWorker(ModulesManagementProcessor::class, $actionName); |
46
|
|
|
} |
47
|
|
|
} |
48
|
|
|
|