CLI_Manager
CLI Manager class for registering WP-CLI commands.
Namespace: WebberZone\Contextual_Related_Posts\Pro\CLI
Since: 4.2.0
Source: includes/cli/class-cli-manager.php line 21
Methods
__construct()
Constructor.
Since: 4.2.0
Line: 36
public function __construct( );
register_commands()
Register all WP-CLI commands.
Since: 4.2.0
Line: 68
public function register_commands( ): void;
Returns: void
get_command()
Get command instance by name.
Since: 4.2.0
Line: 87
public function get_command( string $command_name ): ?Base_Command;
| Type | Name | Description |
|---|---|---|
string | $command_name | Command name. |
Returns: ?Base_Command — Command instance or null if not found.
get_commands()
Get all registered commands.
Since: 4.2.0
Line: 98
public function get_commands( ): array;
Returns: array — Array of command instances.