WP_CLI\Dispatcher

RootCommand::find_subcommand()publicWP-CLI 1.0

Find a subcommand registered on the root command.

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

Хуков нет.

Возвращает

Subcommand|false.

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

$RootCommand = new RootCommand();
$RootCommand->find_subcommand( $args );
$args(массив) (обязательный) (передается по ссылке — &)
-

Код RootCommand::find_subcommand() WP-CLI 2.8.0-alpha

public function find_subcommand( &$args ) {
	$command = array_shift( $args );

	Utils\load_command( $command );

	if ( ! isset( $this->subcommands[ $command ] ) ) {
		return false;
	}

	return $this->subcommands[ $command ];
}