method init documentation in bbn\Appui\History

Initializes

function(bbn\Db $db, array $cfg = []) { /** @var string $hash Unique hash for this DB connection (so we don't init twice a same connection) */ $hash = $db->getHash(); if ( !\in_array($hash, self::$dbs, true) && $db->check() ){ // Adding the connection to the list of connections self::$dbs[] = $hash; /** @var bbn\Db db */ self::$db = $db; $vars = get_class_vars(__CLASS__); foreach ( $cfg as $cf_name => $cf_value ){ if ( array_key_exists($cf_name, $vars) ){ self::$$cf_name = $cf_value; } } if ( !self::$admin_db ){ self::$admin_db = self::$db->getCurrent(); } self::$table = self::$admin_db.'.'.self::$prefix.'history'; self::$table_uids = self::$admin_db.'.'.self::$prefix.'history_uids'; self::$ok = true; self::$is_used = true; self::$links = self::$db->getForeignKeys('bbn_uid', self::$prefix.'history_uids', self::$admin_db); self::$db->setTrigger('\\bbn\\Appui\\History::trigger'); } }

Initializes 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.