WP_CLI\Bootstrap

DefineProtectedCommands::get_current_command()privateWP-CLI 1.0

Get the current command as a string.

Метод класса: DefineProtectedCommands{}

Хуков нет.

Возвращает

Строку. Current command to be executed.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->get_current_command();

Код DefineProtectedCommands::get_current_command() WP-CLI 2.8.0-alpha

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

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