Action_Scheduler\Migration
Runner::__construct()
Runner constructor.
Метод класса: Runner{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Runner = new Runner(); $Runner->__construct( $config );
- $config(Config) (обязательный)
- Migration configuration object.
Код Runner::__construct() Runner:: construct WC 8.7.0
public function __construct( Config $config ) { $this->source_store = $config->get_source_store(); $this->destination_store = $config->get_destination_store(); $this->source_logger = $config->get_source_logger(); $this->destination_logger = $config->get_destination_logger(); $this->batch_fetcher = new BatchFetcher( $this->source_store ); if ( $config->get_dry_run() ) { $this->log_migrator = new DryRun_LogMigrator( $this->source_logger, $this->destination_logger ); $this->action_migrator = new DryRun_ActionMigrator( $this->source_store, $this->destination_store, $this->log_migrator ); } else { $this->log_migrator = new LogMigrator( $this->source_logger, $this->destination_logger ); $this->action_migrator = new ActionMigrator( $this->source_store, $this->destination_store, $this->log_migrator ); } if ( defined( 'WP_CLI' ) && WP_CLI ) { $this->progress_bar = $config->get_progress_bar(); } }