Action_Scheduler\Migration
Runner::__construct
Runner constructor.
Method of the class: Runner{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Runner = new Runner(); $Runner->__construct( $config );
- $config(Config) (required)
- Migration configuration object.
Runner::__construct() Runner:: construct code WC 10.3.6
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();
}
}