Subversion Repositories eFlore/Applications.coel-consultation

Compare Revisions

Ignore whitespace Rev 15 → Rev 16

/trunk/bibliotheque/noyau/ColModele.php
35,4 → 35,19
public function getLimiteNbre() {
return $this->limite_nbre;
}
protected function nettoyerTableauDeTableauxAssoc(&$tableau) {
foreach ($tableau as $cle => $valeur) {
$this->nettoyerTableauAssoc($valeur);
$tableau[$cle] = $valeur;
}
}
protected function nettoyerTableauAssoc(&$tableau) {
foreach ($tableau as $cle => $valeur) {
if (is_numeric($cle) && is_int((integer) $cle)) {
unset($tableau[$cle]);
}
}
}
}
/trunk/bibliotheque/noyau/ColControleur.php
89,11 → 89,19
$this->sortie = array_merge($this->sortie, $sortie);
}
protected function construireTxtTruckSimple($chaine_a_analyser) {
return $this->construireTxtTruck($chaine_a_analyser, false, false);
}
protected function construireTxtTruckSansMajuscule($chaine_a_analyser) {
return $this->construireTxtTruck($chaine_a_analyser, false);
}
protected function construireTxtTruck($chaine_a_analyser, $majuscule = true) {
protected function construireTxtTruckSansPointFinal($chaine_a_analyser) {
return $this->construireTxtTruck($chaine_a_analyser, true, false);
}
protected function construireTxtTruck($chaine_a_analyser, $majuscule = true, $point_final = true) {
$termes = array();
if ((!is_null($chaine_a_analyser)) && (trim($chaine_a_analyser) != '')) {
$valeurs = explode(self::SEPARATEUR_VALEURS, $chaine_a_analyser);
109,7 → 117,7
}
}
$chaine_a_retourner = $this->formaterTableauDeTxt($termes, $majuscule);
$chaine_a_retourner = $this->formaterTableauDeTxt($termes, $majuscule, $point_final);
return $chaine_a_retourner;
}
141,7 → 149,7
return $txt_a_retourner;
}
protected function formaterTableauDeTxt($tableau_de_txt, $majuscule = true) {
protected function formaterTableauDeTxt($tableau_de_txt, $majuscule = true, $point_final = true) {
$chaine_a_afficher = '';
$taille_du_tableau = count($tableau_de_txt);
if ($taille_du_tableau > 0) {
151,7 → 159,10
if ($i != $index_avt_dernier) {
$chaine_a_afficher .= $mot.', ';
} else {
$chaine_a_afficher .= $this->nettoyerPointFinal($mot).'.';
$chaine_a_afficher .= $this->nettoyerPointFinal($mot);
if ($point_final) {
$chaine_a_afficher .= '.';
}
}
}
}