Automattic\WooCommerce\Blueprint

ImportStep::__constructpublicWC 1.0

ImportStep constructor.

Method of the class: ImportStep{}

Hooks from the method

Returns

null. Nothing (null).

Usage

$ImportStep = new ImportStep();
$ImportStep->__construct( $step_definition, ?Validator $validator );
$step_definition(object) (required)
The step definition.
?Validator $validator
.
Default: null

ImportStep::__construct() code WC 9.9.5

public function __construct( $step_definition, ?Validator $validator = null ) {
	$this->step_definition = $step_definition;
	if ( null === $validator ) {
		$validator = new Validator();
	}
	$this->validator         = $validator;
	$this->importers         = $this->wp_apply_filters( 'wooblueprint_importers', ( ( new BuiltInStepProcessors() )->get_all() ) );
	$this->indexed_importers = Util::index_array(
		$this->importers,
		function ( $key, $importer ) {
			return $importer->get_step_class()::get_step_name();
		}
	);
}