WP_CLI\Bootstrap

DefineProtectedCommands::get_current_command()privateWP-CLI 1.0

Get the current command as a string.

Method of the class: DefineProtectedCommands{}

No Hooks.

Return

String. Current command to be executed.

Usage

// private - for code of main (parent) class only
$result = $this->get_current_command();

DefineProtectedCommands::get_current_command() code WP-CLI 2.8.0-alpha

private function get_current_command() {
	$runner = new RunnerInstance();

	return implode( ' ', (array) $runner()->arguments );
}