WP_CLI

Runner::run_command_and_exit()privateWP-CLI 1.0

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

Хуков нет.

Возвращает

null. Ничего (null).

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

// private - только в коде основоного (родительского) класса
$result = $this->run_command_and_exit( $help_exit_warning );
$help_exit_warning **
-
По умолчанию: ''

Код Runner::run_command_and_exit() WP-CLI 2.8.0-alpha

private function run_command_and_exit( $help_exit_warning = '' ) {
	$this->show_synopsis_if_composite_command();
	$this->run_command( $this->arguments, $this->assoc_args );
	if ( $this->cmd_starts_with( [ 'help' ] ) ) {
		// Help couldn't find the command so exit with suggestion.
		$suggestion_or_disabled = $this->find_command_to_run( array_slice( $this->arguments, 1 ) );
		if ( is_string( $suggestion_or_disabled ) ) {
			if ( $help_exit_warning ) {
				WP_CLI::warning( $help_exit_warning );
			}
			WP_CLI::error( $suggestion_or_disabled );
		}
		// Should never get here.
	}
	exit;
}