Skip to content
Snippets Groups Projects
Select Git revision
  • 57f32a5f6d5f48c3f88cddd2bf79f33a4bbf652c
  • master default protected
  • fix/deprecated_functions
  • devel
  • feat/translations
  • feat/upgrade_to_pro_url
  • feat/lang
  • bugfix/require-interface
  • bugfix/require-once-error
  • feature/activation-hooks
  • feature/template-loader
  • feature/template-renderer
  • feature/plugin-activation
  • feature/hookable-object
  • feature/builder-pattern
  • 2.1.2
  • 2.1.1
  • 2.1.0
  • 2.0.0
  • 2.0.0-beta1
  • 1.4.4
  • 1.4.3
  • 1.4.2
  • 1.4.1
  • 1.4
  • 1.3.3
  • 1.3.2
  • 1.3.1
  • 1.3.0
  • 1.2.0
  • 1.1
  • 1.0
32 results

HookableParetn.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
    		);
    	}
    
    }