WP_CLI\Bootstrap
LoadExecCommand::process()
Process this single bootstrapping step.
Method of the class: LoadExecCommand{}
No Hooks.
Return
BootstrapState
. Modified state to pass to the next step.
Usage
$LoadExecCommand = new LoadExecCommand(); $LoadExecCommand->process( $state );
- $state(BootstrapState) (required)
- Contextual state to pass into the step.
LoadExecCommand::process() LoadExecCommand::process code WP-CLI 2.8.0-alpha
public function process( BootstrapState $state ) { if ( $state->getValue( BootstrapState::IS_PROTECTED_COMMAND, false ) ) { return $state; } $runner = new RunnerInstance(); if ( ! isset( $runner()->config['exec'] ) ) { return $state; } foreach ( $runner()->config['exec'] as $php_code ) { eval( $php_code ); // phpcs:ignore Squiz.PHP.Eval.Discouraged } return $state; }