Runner::__construct() – Runner constructor.

You appear to be a bot. Output may be restricted

Description

Runner constructor.

Usage

Runner::__construct( $config );

Parameters

$config
( Config ) required – Migration configuration object.

Returns

void

Source

File name: woocommerce/packages/action-scheduler/classes/migration/Runner.php
Lines:

1 to 19 of 19
  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();
    }
  }
 

 View on GitHub View on Trac