Hello everyone. I want to output the column 'tablePrefix' in config.php, to work with custom database prefix in my addon. How can i do this?
My custom database adapter:
Thanks in advance.
My custom database adapter:
PHP:
public function getDb()
{
$config = $this->app()->get('config');
return new \XF\Db\Mysqli\Adapter($config['sbintegration'], $config['fullUnicode']);
}
public function getEm($db = null)
{
if ($db == null)
{
$db = $this->getDb();
}
$app = $this->app();
return new \XF\Mvc\Entity\Manager($db, $app->get('em.valueFormatter'), $app->get('extension'));
}
Thanks in advance.