| Line 27... |
Line 27... |
| 27 |
$this->appUrls = $this->conteneur->getAppUrls();
|
27 |
$this->appUrls = $this->conteneur->getAppUrls();
|
| 28 |
$this->wikini = $this->conteneur->getApiWikini();
|
28 |
$this->wikini = $this->conteneur->getApiWikini();
|
| 29 |
}
|
29 |
}
|
| Line 30... |
Line 30... |
| 30 |
|
30 |
|
| 31 |
public function obtenirDonnees() {
|
31 |
public function obtenirDonnees() {
|
| 32 |
|
32 |
|
| 33 |
$donnees = array();
|
33 |
$donnees = array();
|
| 34 |
$donnees['flores_synonymes'] = $this->getFlores();
|
34 |
$donnees['flores_synonymes'] = $this->getFlores();
|
| 35 |
$donnees['synonymes']['noms'] = $this->getSynonymes();
|
35 |
$donnees['synonymes']['noms'] = $this->getSynonymes();
|
| 36 |
$donnees['date_maj'] = $this->nomCourant->getNomRetenu()->get('maj_modif');
|
36 |
$donnees['date_maj'] = $this->nomCourant->getNomRetenu()->get('maj_modif');
|
| Line 43... |
Line 43... |
| 43 |
$donnees['nom_retenu_formate'] = $this->nomCourant->getNomRetenu()->get('nom_sci_html_complet');
|
43 |
$donnees['nom_retenu_formate'] = $this->nomCourant->getNomRetenu()->get('nom_sci_html_complet');
|
| 44 |
$donnees['basionyme_nom_retenu'] = $this->nomCourant->getNomRetenu()->get('basionyme_html_complet');
|
44 |
$donnees['basionyme_nom_retenu'] = $this->nomCourant->getNomRetenu()->get('basionyme_html_complet');
|
| 45 |
$donnees['nom_selectionne'] = $this->nomCourant->getNomSelectionne()->get('nom_sci_html');
|
45 |
$donnees['nom_selectionne'] = $this->nomCourant->getNomSelectionne()->get('nom_sci_html');
|
| 46 |
$donnees['nom_retenu'] = $this->nomCourant->getNomRetenu()->get('nom_sci_html');
|
46 |
$donnees['nom_retenu'] = $this->nomCourant->getNomRetenu()->get('nom_sci_html');
|
| 47 |
$donnees['wikini'] = $this->getWikini();
|
47 |
$donnees['wikini'] = $this->getWikini();
|
| 48 |
|
48 |
|
| 49 |
return $donnees;
|
49 |
return $donnees;
|
| 50 |
}
|
50 |
}
|
| Line 51... |
Line 51... |
| 51 |
|
51 |
|
| 52 |
public function getBloc() {
|
52 |
public function getBloc() {
|
| Line 56... |
Line 56... |
| 56 |
$synonymes = $this->getSynonymes();
|
56 |
$synonymes = $this->getSynonymes();
|
| 57 |
$donnees['synonymes'] = array_slice($synonymes, 0, 3);
|
57 |
$donnees['synonymes'] = array_slice($synonymes, 0, 3);
|
| 58 |
$donnees['autresSynonymesNbre'] = count($synonymes) - 3;
|
58 |
$donnees['autresSynonymesNbre'] = count($synonymes) - 3;
|
| 59 |
return $donnees;
|
59 |
return $donnees;
|
| 60 |
}
|
60 |
}
|
| 61 |
|
61 |
|
| 62 |
private function getFlores() {
|
62 |
private function getFlores() {
|
| 63 |
$nnr = $this->nomCourant->getNnr();
|
63 |
$nnr = $this->nomCourant->getNnr();
|
| 64 |
$flores = $this->noms->getFlores($nnr);
|
64 |
$flores = $this->noms->getFlores($nnr);
|
| 65 |
$flores['resultat'] = (isset($flores['resultat']) && is_array($flores['resultat'])) ? $flores['resultat'] : array();
|
65 |
$flores['resultat'] = (isset($flores['resultat']) && is_array($flores['resultat'])) ? $flores['resultat'] : array();
|
| 66 |
return $flores['resultat'];
|
66 |
return $flores['resultat'];
|
| 67 |
}
|
67 |
}
|
| Line 68... |
Line 68... |
| 68 |
|
68 |
|
| 69 |
private function getSynonymes() {
|
69 |
private function getSynonymes() {
|
| 70 |
$nns = $this->nomCourant->getNns();
|
70 |
$nns = $this->nomCourant->getNns();
|
| - |
|
71 |
$synonymesReponse = $this->noms->getSynonymes($nns);
|
| - |
|
72 |
|
| - |
|
73 |
$synonymes = array();
|
| - |
|
74 |
if (isset($synonymesReponse['resultat']) && is_array($synonymes['resultat'])) {
|
| 71 |
$synonymes = $this->noms->getSynonymes($nns);
|
75 |
$synonymes = $synonymesReponse['resultat'];
|
| 72 |
if (array_key_exists($this->nomCourant->getNnr(), $synonymes['resultat'])) {
|
76 |
if (array_key_exists($this->nomCourant->getNnr(), $synonymes)) {
|
| - |
|
77 |
unset($synonymes[$this->nomCourant->getNnr()]);
|
| 73 |
unset($synonymes['resultat'][$this->nomCourant->getNnr()]);
|
78 |
}
|
| 74 |
}
|
- |
|
| 75 |
$synonymes['resultat'] = (isset($synonymes['resultat']) && is_array($synonymes['resultat'])) ? $synonymes['resultat'] : array();
|
79 |
}
|
| 76 |
return $synonymes['resultat'];
|
80 |
return $synonymes;
|
| 77 |
}
|
81 |
}
|
| 78 |
|
82 |
|
| 79 |
private function getWikini() {
|
83 |
private function getWikini() {
|
| 80 |
$wikini = array();
|
84 |
$wikini = array();
|
| 81 |
$wikini['titre'] = 'Wikini';
|
85 |
$wikini['titre'] = 'Wikini';
|
| 82 |
$referentiel = $this->conteneur->getParametre('referentiel');
|
86 |
$referentiel = $this->conteneur->getParametre('referentiel');
|