Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
Installer | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
6 |
1 | <?php |
2 | |
3 | namespace NewfoldLabs\WP\Module\Installer; |
4 | |
5 | use NewfoldLabs\WP\Module\Installer\RestApi\RestApi; |
6 | use NewfoldLabs\WP\Module\Installer\WPAdmin\WPAdmin; |
7 | use NewfoldLabs\WP\Module\Installer\TaskManagers\TaskManager; |
8 | use NewfoldLabs\WP\Module\Installer\WPCLI\WPCLI; |
9 | use NewfoldLabs\WP\ModuleLoader\Container; |
10 | |
11 | /** |
12 | * The Module's main class. |
13 | */ |
14 | class Installer { |
15 | |
16 | /** |
17 | * Dependency injection container. |
18 | * |
19 | * @var Container |
20 | */ |
21 | protected $container; |
22 | |
23 | /** |
24 | * Constructor. |
25 | * |
26 | * @param Container $container The module container. |
27 | */ |
28 | public function __construct( Container $container ) { |
29 | |
30 | $this->container = $container; |
31 | |
32 | // Module functionality goes here |
33 | |
34 | new RestApi(); |
35 | |
36 | new TaskManager(); |
37 | |
38 | new WPCLI(); |
39 | |
40 | if ( Permissions::rest_is_authorized_admin() ) { |
41 | new WPAdmin(); |
42 | } |
43 | } |
44 | } |