/** * Genère la vue HTML qui va lister les enregistrements de la table pour la table $nomTable * @param string $nomTable nom de la table */ private function creerVueLister($nomTable) { $chaine = file_get_contents(BASE_REP . "_controleur/ctr_" . $this->table . "/template/vue_xxx_lister.txt"); $chaine = str_replace("[nomTable]", $nomTable, $chaine); $nomCle = self::clePrimaire($nomTable); $chaine = str_replace("[nomCle]", $nomCle, $chaine); $thnc = $this->thListeChamp(Table::getChamps($nomTable)); $chaine = str_replace("[thListeChamps]", $thnc, $chaine); $tdlv = $this->tdListeValeur(Table::getChamps($nomTable)); $chaine = str_replace("[tdListeValeur]", $tdlv, $chaine); file_put_contents(BASE_REP . "_controleur/ctr_" . $nomTable . "/vue_" . $nomTable . "_lister.php", $chaine); }