-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommand.php
More file actions
42 lines (34 loc) · 1.03 KB
/
Command.php
File metadata and controls
42 lines (34 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
namespace AncientWorks\Artifact\Modules\Command;
use AncientWorks\Artifact\Artifact;
use AncientWorks\Artifact\Module;
use AncientWorks\Artifact\Modules\Command\Commands\OxygenBuilderCommand;
use WP_CLI;
/**
* @package AncientWorks\Artifact
* @since 0.0.1
* @author ancientworks <mail@ancient.works>
* @link https://github.com/artifact-modules/command
*/
class Command extends Module
{
public static $module_id = 'command';
public static $module_version = '0.0.1';
public static $module_name = 'Artifact Command';
public static $namespace;
public function __construct()
{
self::$namespace = Artifact::$slug;
parent::__construct();
}
public function boot()
{
if (!class_exists('WP_CLI')) {
return;
}
if (class_exists('WP_CLI\Dispatcher\CommandNamespace')) {
WP_CLI::add_command(self::$namespace, ArtifactNamespace::class);
}
WP_CLI::add_command(self::$namespace . ' oxygen-builder', OxygenBuilderCommand::class);
}
}