WP_CLI\Bootstrap

RegisterDeferredCommands::process()publicWP-CLI 1.0

Process this single bootstrapping step.

Method of the class: RegisterDeferredCommands{}

No Hooks.

Return

BootstrapState. Modified state to pass to the next step.

Usage

$RegisterDeferredCommands = new RegisterDeferredCommands();
$RegisterDeferredCommands->process( $state );
$state(BootstrapState) (required)
Contextual state to pass into the step.

RegisterDeferredCommands::process() code WP-CLI 2.8.0-alpha

public function process( BootstrapState $state ) {

	// Process deferred command additions for external packages.
	$this->add_deferred_commands();

	// Process deferred command additions for commands added through
	// plugins.
	WP_CLI::add_hook(
		'before_run_command',
		[ $this, 'add_deferred_commands' ]
	);

	return $state;
}