getBdd(); if ($type === Logs::class) { Logs::initialiser($bdd, 0); return Logs::_obtenirInstance(); } return new $type($bdd); } /** * @return Base_De_Donnees */ private function getBdd() { if ($this->bdd === null) { if (isset($GLOBALS['AFUP_DB']) === false) { throw new \RuntimeException('Could not find the legacy database connexion'); } $this->bdd = $GLOBALS['AFUP_DB']; } return $this->bdd; } }