php/WP_CLI/Runner.php
public function run_command( $args, $assoc_args = array(), $options = array() ) {
		WP_CLI::do_hook( 'before_run_command' );

		if ( ! empty( $options['back_compat_conversions'] ) ) {
			list( $args, $assoc_args ) = self::back_compat_conversions( $args, $assoc_args );
		}
		$r = $this->find_command_to_run( $args );
		if ( is_string( $r ) ) {
			WP_CLI::error( $r );
		}

		list( $command, $final_args, $cmd_path ) = $r;

		$name = implode( ' ', $cmd_path );

		$extra_args = array();

		if ( isset( $this->extra_config[ $name ] ) ) {
			$extra_args = $this->extra_config[ $name ];
		}

		WP_CLI::debug( 'Running command: ' . $name, 'bootstrap' );
		try {
			$command->invoke( $final_args, $assoc_args, $extra_args );
		} catch ( WP_CLI\Iterators\Exception $e ) {
			WP_CLI::error( $e->getMessage() );
		}
	}
public function run_command( $args, $assoc_args = array(), $options = array() ) {
		WP_CLI::do_hook( 'before_run_command' );

		if ( ! empty( $options['back_compat_conversions'] ) ) {
			list( $args, $assoc_args ) = self::back_compat_conversions( $args, $assoc_args );
		}
		$r = $this->find_command_to_run( $args );
		if ( is_string( $r ) ) {
			WP_CLI::error( $r );
		}

		list( $command, $final_args, $cmd_path ) = $r;

		$name = implode( ' ', $cmd_path );

		$extra_args = array();

		if ( isset( $this->extra_config[ $name ] ) ) {
			$extra_args = $this->extra_config[ $name ];
		}

		WP_CLI::debug( 'Running command: ' . $name, 'bootstrap' );
		try {
			$command->invoke( $final_args, $assoc_args, $extra_args );
		} catch ( WP_CLI\Iterators\Exception $e ) {
			WP_CLI::error( $e->getMessage() );
		}
	}
public function run_command ( $ args , $ assoc_args = array ( ) , $ options = array ( ) ) { WP_CLI :: do_hook ( 'before_run_command' ) ; if ( ! empty ( $ options [ 'back_compat_conversions' ] ) ) { list ( $ args , $ assoc_args ) = self :: back_compat_conversions ( $ args , $ assoc_args ) ; } $ r = $ this -> find_command_to_run ( $ args ) ; if ( is_string ( $ r ) ) { WP_CLI :: error ( $ r ) ; } list ( $ command , $ final_args , $ cmd_path ) = $ r ; $ name = implode ( ' ' , $ cmd_path ) ; $ extra_args = array ( ) ; if ( isset ( $ this -> extra_config [ $ name ] ) ) { $ extra_args = $ this -> extra_config [ $ name ] ; } WP_CLI :: debug ( 'Running command: ' . $ name , 'bootstrap' ) ; try { $ command -> invoke ( $ final_args , $ assoc_args , $ extra_args ) ; } catch ( WP_CLI \ Iterators \ Exception $ e ) { WP_CLI :: error ( $ e -> getMessage ( ) ) ; } }
Find the WP-CLI command to run given arguments, and invoke it.

@param array $args        Positional arguments including command name
@param array $assoc_args  Associative arguments for the command.
@param array $options     Configuration options for the function.
Find the WP - CLI command to run given arguments and invoke it .