decode_migration/migrations-db.php

18 lines
696 B
PHP
Raw Normal View History

<?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);