-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7d04ac
commit 9852dce
Showing
3 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
/** | ||
* ASMP WordPress Integration Plugin. | ||
* | ||
* @package ASMP\WordPressIntegration | ||
* @license MIT | ||
* @link https://www.alainschlesser.com/asmp | ||
*/ | ||
|
||
namespace ASMP\WordPressIntegration\Console; | ||
|
||
use WP_CLI; | ||
|
||
final class AsmpCommand { | ||
|
||
/** | ||
* Run a check against ASMP. | ||
* | ||
* @param array $args Positional arguments. | ||
* @param array $assoc_args Associative arguments. | ||
*/ | ||
public function check( array $args, array $assoc_args ) { | ||
WP_CLI::error( 'Not implemented yet' ); | ||
} | ||
|
||
/** | ||
* Request a change through ASMP. | ||
* | ||
* @param array $args Positional arguments. | ||
* @param array $assoc_args Associative arguments. | ||
*/ | ||
public function change( array $args, array $assoc_args ) { | ||
WP_CLI::error( 'Not implemented yet' ); | ||
} | ||
|
||
/** | ||
* Roll back a change through ASMP. | ||
* | ||
* @param array $args Positional arguments. | ||
* @param array $assoc_args Associative arguments. | ||
*/ | ||
public function rollback( array $args, array $assoc_args ) { | ||
WP_CLI::error( 'Not implemented yet' ); | ||
} | ||
|
||
/** | ||
* Run a check against ASMP. | ||
* | ||
* ## OPTIONS | ||
* | ||
* <id> | ||
* : ID of the change to roll back. | ||
* | ||
* @param array $args Positional arguments. | ||
* @param array $assoc_args Associative arguments. | ||
*/ | ||
public function status( array $args, array $assoc_args ) { | ||
WP_CLI::error( 'Not implemented yet' ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* ASMP WordPress Integration Plugin. | ||
* | ||
* @package ASMP\WordPressIntegration | ||
* @license MIT | ||
* @link https://www.alainschlesser.com/asmp | ||
*/ | ||
|
||
namespace ASMP\WordPressIntegration; | ||
|
||
use ASMP\WordPressIntegration\Infrastructure\Registerable; | ||
use ASMP\WordPressIntegration\Infrastructure\Service; | ||
use WP_CLI; | ||
|
||
/** | ||
* | ||
*/ | ||
final class ConsoleIntegration implements Service, Registerable { | ||
|
||
/** | ||
* Register the service. | ||
* | ||
* @return void | ||
*/ | ||
public function register(): void { | ||
if ( ! class_exists( 'WP_CLI' ) ) { | ||
return; | ||
} | ||
|
||
WP_CLI::add_command( 'asmp', Console\AsmpCommand::class ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters