decode_migration/migrations-db.php

18 lignes
696 B
PHP
Brut Vue normale Historique

<?php
require_once './vendor/autoload.php';
/** @var \OxidEsales\Eshop\Core\DatabaseProvider $db */
$dbprovider = new \OxidEsales\Eshop\Core\DatabaseProvider();
$dbprovider->setConfigFile(new \OxidEsales\Eshop\Core\ConfigFile('./source/config.inc.php'));
$method = new ReflectionMethod(get_class($dbprovider), "getConnectionParameters");
$method->setAccessible(true);
$connParameters = $method->invoke($dbprovider);
$database = new \OxidEsales\Eshop\Core\Database\Adapter\Doctrine\Database();
$database->setConnectionParameters($connParameters);
$method = new ReflectionMethod(get_class($database), "getConnectionParameters");
$method->setAccessible(true);
return $method->invoke($database);