Skip to content
Snippets Groups Projects
Select Git revision
  • 5ab24a09fea27184e99f6ce2a7427464ec37f31e
  • main default protected
  • 1.0.2
  • 1.0.1
  • 1.0.0
  • 1.0.0-beta7
  • 1.0.0-beta6
  • 1.0.0-beta4
  • 1.0.0-beta3
  • 1.0.0-beta2
  • 1.0.0-beta1
11 results

Shopify.php

Blame
  • WpdbMigrationFactory.php 569 B
    <?php
    declare(strict_types=1);
    
    namespace WPDesk\Migrations\Version;
    
    use Psr\Log\LoggerInterface;
    use WPDesk\Migrations\AbstractMigration;
    
    class WpdbMigrationFactory implements MigrationFactory {
    
    	/** @var \wpdb */
    	protected $wpdb;
    
    	/** @var LoggerInterface */
    	protected $logger;
    
    	public function __construct( \wpdb $wpdb, LoggerInterface $logger ) {
    		$this->wpdb   = $wpdb;
    		$this->logger = $logger;
    	}
    
    	public function create_version( string $migration_class ): AbstractMigration {
    		return new $migration_class(
    			$this->wpdb,
    			$this->logger
    		);
    	}
    
    }