method importHost documentation in bbn\Appui\Database
Imports a database's structure into the options table.
function(string $host, string $engine, array $cfg, bool $full = false)
{
if (($id_parent = self::getOptionId('connections', $engine))
&& !($id_host = $this->o->fromCode($host, $id_parent))
) {
$id_host = $this->o->add(
[
'id_parent' => $id_parent,
'text' => $cfg['name'] ?? $host,
'code' => $host
]
);
}
if ($id_host) {
if (!empty($cfg['password'])) {
if (!$this->pw) {
$this->pw = new Passwords($this->db);
}
$this->pw->store($cfg['password'], $id_host);
}
/** @todo but might be heavy */
/* if ($full) {
}*/
}
return $id_host ?: null;
}
Imports a database's structure into the options table. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions