Automattic\WooCommerce\Blueprint

ImportStep::__constructpublicWC 1.0

ImportStep constructor.

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

Хуки из метода

Возвращает

null. Ничего (null).

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

$ImportStep = new ImportStep();
$ImportStep->__construct( $step_definition, ?Validator $validator );
$step_definition(объект) (обязательный)
The step definition.
?Validator $validator
.
По умолчанию: null

Код ImportStep::__construct() WC 10.0.2

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();
		}
	);
}