24,7 → 24,7 |
'septembre', 'octobre', 'novembre', 'décembre'); |
private $CosteFormate; |
private $CosteTexte; |
|
|
public function __construct(Conteneur $conteneur) { |
$this->conteneur = $conteneur; |
$this->nomCourant = $this->conteneur->getNomCourant(); |
43,7 → 43,7 |
$donnees['baseflor'] = $this->getBaseflor(); |
return $donnees; |
} |
|
|
private function getBaseflor() { |
$baseflor = array(); |
$this->informations ->setProjet('baseflor'); |
70,11 → 70,11 |
$citation = $meta[0]['citation']; |
$baseflor['meta']['citation'] = $citation; |
$baseflor['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('baseflor'); |
|
|
} |
return $baseflor; |
} |
|
|
public function changerFloraisonEnChaine($floraison){ |
$chaine = ""; |
if ($floraison != ""){ |
81,7 → 81,7 |
$mois_fleurs=preg_match('/-/',$floraison) ? preg_split('/-/',$floraison) : $floraison; |
if (is_array($mois_fleurs)){ |
$chaine = "de ".$this->mois[(int)$mois_fleurs[0]]." à ".$this->mois[(int)$mois_fleurs[1]]; |
|
|
}else { $chaine = "en ".$this->mois[(int)$mois_fleurs]; |
} |
} |
111,7 → 111,7 |
$wp['titre'] = $texte['titre']; |
$wp['lien'] = $this->textes->getPageUrl(); |
$wp['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('wikipedia'); |
|
|
return $wp; |
} |
|
121,8 → 121,8 |
$idWp = urlencode($idWp); |
return $idWp; |
} |
|
private function getWikini() { |
|
private function getWikini() { |
$wikini = array(); |
$wikini['titre'] = 'Wikini'; |
$referentiel = $this->conteneur->getParametre('referentiel'); |
131,7 → 131,7 |
$wikini['description'] = $this->wikini->getTexteFormate($page_wiki, 'description'); |
return $wikini; |
} |
|
|
private function getCoste() { |
$coste = array(); |
$this->textes->setProjet('coste'); |
139,8 → 139,7 |
$texte = $this->textes->getTexte(); |
if ($texte) { |
$coste['titre'] = $texte['titre']; |
$texte = $this->MettreEnFormeCoste($texte['texte']); |
$coste['description'] = $texte ; |
$coste['description'] = $this->mettreEnFormeCoste($texte['texte']); |
} |
$this->meta->setProjet('coste'); |
$meta = $this->meta->getMetaDonnees(); |
149,8 → 148,8 |
$coste['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('coste'); |
return $coste; |
} |
|
public function MettreEnFormeCoste($texte){ |
|
public function mettreEnFormeCoste($texte){ |
$this->CosteFormate = array(); |
$this->CosteTexte = $texte; |
//decouper elements remarquables avant le texte |
164,8 → 163,8 |
$this->CosteFormate['texte'] = $this->CosteTexte; |
return $this->CosteFormate; |
} |
|
|
|
|
public function separerNomScientifique_a_NomCommun(){ |
if ( preg_match('/\*\*(.+)\*\*([^–]*)–/', $this->CosteTexte, $retour)){ |
/* !! attention on enlève un tiret cadratin – pas un trait d'union - !! */ |
185,8 → 184,8 |
$this->CosteTexte = str_replace($retour[0],'',$this->CosteTexte); |
} |
} |
|
|
|
|
public function separerEcologie_a_Usages(){ |
if ( preg_match('/\.[ ]*([A-ZÉÀÈ].+)$/',$this->CosteTexte, $retour)){ |
$this->CosteFormate['ecologie'] = $retour[1]; |
214,9 → 213,9 |
$this->CosteFormate['fructification'] = str_replace($retour[1],'',$this->CosteFormate['fructification']); |
$this->CosteFormate['fructification'] = str_replace('.','',$this->CosteFormate['fructification']); |
} |
} |
} |
} |
|
|
|
|
} |
?> |