Doctrine\DBAL\Migrations\Version::__construct PHP Method

__construct() public method

public __construct ( Configuration $configuration, $version, $class, Doctrine\DBAL\Migrations\Provider\SchemaDiffProviderInterface $schemaProvider = null )
$configuration Doctrine\DBAL\Migrations\Configuration\Configuration
$schemaProvider Doctrine\DBAL\Migrations\Provider\SchemaDiffProviderInterface
    public function __construct(Configuration $configuration, $version, $class, SchemaDiffProviderInterface $schemaProvider = null)
    {
        $this->configuration = $configuration;
        $this->outputWriter = $configuration->getOutputWriter();
        $this->class = $class;
        $this->connection = $configuration->getConnection();
        $this->migration = new $class($this);
        $this->version = $version;
        if ($schemaProvider !== null) {
            $this->schemaProvider = $schemaProvider;
        }
        if ($schemaProvider === null) {
            $schemaProvider = new SchemaDiffProvider($this->connection->getSchemaManager(), $this->connection->getDatabasePlatform());
            $this->schemaProvider = LazySchemaDiffProvider::fromDefaultProxyFacyoryConfiguration($schemaProvider);
        }
    }