Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
PluginUtility | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
removePlugin | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\App\Models\Domain; |
6 | |
7 | use PeServer\App\Models\Dao\Entities\PluginCategoryMappingsEntityDao; |
8 | use PeServer\App\Models\Dao\Entities\PluginsEntityDao; |
9 | use PeServer\App\Models\Dao\Entities\PluginUrlsEntityDao; |
10 | use PeServer\Core\Database\IDatabaseContext; |
11 | |
12 | abstract class PluginUtility |
13 | { |
14 | public static function removePlugin(IDatabaseContext $database, string $pluginId): void |
15 | { |
16 | $pluginsEntityDao = new PluginsEntityDao($database); |
17 | $pluginUrlsEntityDao = new PluginUrlsEntityDao($database); |
18 | $pluginCategoryMappingsEntityDao = new PluginCategoryMappingsEntityDao($database); |
19 | |
20 | $pluginCategoryMappingsEntityDao->deletePluginCategoryMappings($pluginId); |
21 | $pluginUrlsEntityDao->deleteByPluginId($pluginId); |
22 | $pluginsEntityDao->deletePlugin($pluginId); |
23 | } |
24 | } |