Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 715 | Rev 965 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 715 Rev 853
1
<?php
1
<?php
2
/** Exemple lancement:
2
/** Exemple lancement:
3
 * /opt/lampp/bin/php -d memory_limit=3500M ~/web/eflore-projets/scripts/cli.php sauvages -a chargerTous
3
 * /opt/lampp/bin/php -d memory_limit=3500M ~/web/eflore-projets/scripts/cli.php sauvages -a chargerTous
4
*/
4
*/
5
class Sauvages extends EfloreScript {
5
class Sauvages extends EfloreScript {
6
	private $contenu_fichier = array();
6
	private $contenu_fichier = array();
7
	protected $parametres_autorises = array(
7
	protected $parametres_autorises = array(
8
			'-f' => array(true, true, 'Nom du fichier ou du dossier à traiter'));
8
			'-f' => array(true, true, 'Nom du fichier ou du dossier à traiter'));
-
 
9
	private $caracteresAccentues = array(
-
 
10
			'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î',
-
 
11
			'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß',
-
 
12
			'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î',
-
 
13
			'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā',
-
 
14
			'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď',
-
 
15
			'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ',
-
 
16
			'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ',
-
 
17
			'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ',
-
 
18
			'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ',
-
 
19
			'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ',
-
 
20
			'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ',
-
 
21
			'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż',
-
 
22
			'ż', 'Ž', 'ž', 'ſ', 'ƒ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ǎ', 'ǎ', 'Ǐ', 'ǐ', 'Ǒ', 'ǒ',
-
 
23
			'Ǔ', 'ǔ', 'Ǖ', 'ǖ', 'Ǘ', 'ǘ', 'Ǚ', 'ǚ', 'Ǜ', 'ǜ', 'Ǻ', 'ǻ', 'Ǽ', 'ǽ', 'Ǿ', 'ǿ');
-
 
24
	private $caracteresNormaux = array(
-
 
25
			'A', 'A', 'A', 'A', 'A', 'A', 'AE', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I',
-
 
26
			'I', 'D', 'N', 'O', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y', 's',
-
 
27
			'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i',
-
 
28
			'i', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y', 'A', 'a',
-
 
29
			'A', 'a', 'A', 'a', 'C', 'c', 'C', 'c', 'C', 'c', 'C', 'c', 'D', 'd', 'D', 'd',
-
 
30
			'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'G', 'g', 'G', 'g', 'G', 'g',
-
 
31
			'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i',
-
 
32
			'IJ', 'ij', 'J', 'j', 'K', 'k', 'L', 'l', 'L', 'l', 'L', 'l', 'L', 'l', 'l', 'l',
-
 
33
			'N', 'n', 'N', 'n', 'N', 'n', 'n', 'O', 'o', 'O', 'o', 'O', 'o', 'OE', 'oe', 'R',
-
 
34
			'r', 'R', 'r', 'R', 'r', 'S', 's', 'S', 's', 'S', 's', 'S', 's', 'T', 't', 'T', 't',
-
 
35
			'T', 't', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'W', 'w', 'Y',
-
 
36
			'y', 'Y', 'Z', 'z', 'Z', 'z', 'Z', 'z', 's', 'f', 'O', 'o', 'U', 'u', 'A', 'a', 'I',
-
 
37
			'i', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'A', 'a', 'AE', 'ae', 'O', 'o');
9
 
38
 
10
	public function executer() {
39
	public function executer() {
11
		// Lancement de l'action demandée
40
		// Lancement de l'action demandée
12
		try {
41
		try {
13
			$this->initialiserProjet('sauvages');
42
			$this->initialiserProjet('sauvages');
14
 
43
 
15
			$cmd = $this->getParametre('a');
44
			$cmd = $this->getParametre('a');
16
			switch ($cmd) {
45
			switch ($cmd) {
17
				case 'chargerTous' :
46
				case 'chargerTous' :
18
					$this->creerXmlTaxons();
47
					$this->creerXmlTaxons();
19
					$this->creerXmlCriteres();
48
					$this->creerXmlCriteres();
20
					break;
49
					break;
21
				case 'creerXmlCriteres' :
50
				case 'creerXmlCriteres' :
22
					$this->creerXmlCriteres();
51
					$this->creerXmlCriteres();
23
					break;
52
					break;
24
				case 'creerXmlTaxons' :
53
				case 'creerXmlTaxons' :
25
					$this->creerXmlTaxons();
54
					$this->creerXmlTaxons();
26
					break;
55
					break;
27
				default :
56
				default :
28
					throw new Exception("Erreur : la commande '$cmd' n'existe pas!");
57
					throw new Exception("Erreur : la commande '$cmd' n'existe pas!");
29
			}
58
			}
30
		} catch (Exception $e) {
59
		} catch (Exception $e) {
31
			$this->traiterErreur($e->getMessage());
60
			$this->traiterErreur($e->getMessage());
32
		}
61
		}
33
	}
62
	}
34
 
63
 
35
	public function creerXmlCriteres() {
64
	public function creerXmlCriteres() {
36
		$this->recupererContenuFichier();
65
		$this->recupererContenuFichier();
37
		$criteres_label = $this->contenu_fichier[0];
66
		$criteres_nom = $this->contenu_fichier[0];
38
		unset($this->contenu_fichier[0]);
67
		unset($this->contenu_fichier[0]);		
39
		$description_label = $this->contenu_fichier[1];
68
		$criteres_label = $this->contenu_fichier[1];
40
		unset($this->contenu_fichier[1]);
69
		unset($this->contenu_fichier[1]);
-
 
70
		$description_label = $this->contenu_fichier[2];
-
 
71
		unset($this->contenu_fichier[2]);
41
		$criteres_valeurs = $this->extraireValeurs();
72
		$criteres_valeurs = $this->extraireValeurs();
42
		$xml = $this->$formerXmlCriteres($criteres_label, $description_label, $criteres_valeurs);//print_r($xml);
73
		$xml = $this->formerXmlCriteres($criteres_nom, $criteres_label, $description_label, $criteres_valeurs);//print_r($xml);
43
		file_put_contents("./xml_criteres.xml", $xml);
74
		file_put_contents("./xml_criteres.xml", $xml);
44
	}
75
	}
45
	
76
	
46
	
77
	
47
	public function formerXmlCriteres($label, $description, $valeurs) {
78
	public function formerXmlCriteres($nom, $label, $description, $valeurs) {
48
		$xml='<keys>
79
		$xml='<keys>
49
				<groupe id="1">
80
				<groupe id="1">
50
					<nom>Arbres</nom>
81
					<nom>Arbres</nom>
51
					<media>images/pictos/icone_arbre.png</media>
82
					<media>images/pictos/icone_arbre.png</media>
52
					<criteres>';
83
					<criteres>';
53
		foreach ($label as $id=>$criteres) {
84
		foreach ($label as $id=>$criteres) {
54
			if ($id > 2) {
85
			if ($id > 2) {
55
				$xml .= '<critere id="1.'.$id.'">
86
				$xml .= '<critere id="1.'.$id.'">
56
							<label>'.$criteres.'</label>
87
							<label>'.$criteres.'</label>
57
							<description>'.$description[$id].'</description>
88
							<description>'.$description[$id].'</description>
58
							<valeurs>';
89
							<valeurs>';
59
				foreach ($valeurs[$id] as $id_val=>$valeur) {
90
				foreach ($valeurs[$id] as $id_val=>$valeur) {
60
					if ($valeur != "0") {
91
					if ($valeur != "0") {
61
						$crit = explode(" ", $criteres);
92
						$crit = str_replace(" ", "_", $this->supprimerAccents($nom[$id]));
62
						$val = explode(" ", $valeur);
93
						$val = str_replace(" ", "_", $this->supprimerAccents($valeur));
63
						$image = $crit[0]."_".$val[0];
94
						$image = $crit."_".$val;
64
						$xml .= '<valeur code="1.'.$id.'.'.$id_val.'" media="images/pictos/'.$image.'.png">'.$valeur.'</valeur>';
95
						$xml .= '<valeur code="1.'.$id.'.'.$id_val.'" media="images/pictos/'.$image.'.png">'.$valeur.'</valeur>';
65
					}
96
					}
66
				}
97
				}
67
				$xml .= '</valeurs></critere>';
98
				$xml .= '</valeurs></critere>';
68
			}
99
			}
69
		}
100
		}
70
		$xml .= "</criteres>
101
		$xml .= "</criteres>
71
			</groupe>
102
			</groupe>
72
			</keys>";
103
			</keys>";
73
		return $xml;
104
		return $xml;
74
	}
105
	}
75
	
106
	
76
	private function extraireValeurs() {
107
	private function extraireValeurs() {
77
		$valeurs = array();
108
		$valeurs = array();
78
		foreach ($this->contenu_fichier as $ligne) {
109
		foreach ($this->contenu_fichier as $ligne) {
79
			$i = 0;
110
			$i = 0;
80
			foreach ($ligne as $critere) {
111
			foreach ($ligne as $critere) {
81
				if (!isset($valeurs[$i]) || !in_array(trim($critere), $valeurs[$i])) {
112
				if (!isset($valeurs[$i]) || !in_array(trim($critere), $valeurs[$i])) {
82
					$valeurs[$i][] = trim($critere);
113
					$valeurs[$i][] = trim($critere);
83
				}
114
				}
84
				$i++;
115
				$i++;
85
			}
116
			}
86
		}
117
		}
87
		return $valeurs;
118
		return $valeurs;
88
	}
119
	}
89
	
120
	
90
	
121
	
91
	public function creerXmlTaxons() {
122
	public function creerXmlTaxons() {
92
		$this->recupererContenuFichier();
123
		$this->recupererContenuFichier();
93
		$criteres_label = array_flip($this->contenu_fichier[0]);
124
		$criteres_label = array_flip($this->contenu_fichier[0]);
94
		unset($this->contenu_fichier[0]);
125
		unset($this->contenu_fichier[0]);
95
		unset($this->contenu_fichier[1]);
126
		unset($this->contenu_fichier[1]);
-
 
127
		unset($this->contenu_fichier[2]);
96
		$criteres_valeurs = $this->extraireValeurs();
128
		$criteres_valeurs = $this->extraireValeurs();
97
		$xml = $this->formerXmlTaxons($criteres_label, $criteres_valeurs); //print_r($xml);
129
		$xml = $this->formerXmlTaxons($criteres_label, $criteres_valeurs); //print_r($xml);
98
		file_put_contents("./xml_taxons.xml", $xml);
130
		file_put_contents("./xml_taxons.xml", $xml);
99
	}
131
	}
100
	
132
	
101
	public function formerXmlTaxons($criteres_label, $criteres_valeurs) {
133
	public function formerXmlTaxons($criteres_label, $criteres_valeurs) {
102
		$xml='<?xml version="1.0" ?><TAXONS SUBJECT="XML">';
134
		$xml='<?xml version="1.0" ?><TAXONS SUBJECT="XML">';
103
		$rest = new RestClient();
135
		$rest = new RestClient();
104
		foreach ($this->contenu_fichier as $id=>$taxon) {
136
		foreach ($this->contenu_fichier as $id=>$taxon) {
105
			$infos_taxon = $this->rechercherInfosTaxon($rest, $taxon[$criteres_label["nom scientifique"]]);
137
			$infos_taxon = $this->rechercherInfosTaxon($rest, $taxon[$criteres_label["nom scientifique"]]);
106
			$xml .= '<TAXON id="'.$id.'" value="'.
138
			$xml .= '<TAXON id="'.$id.'" value="'.
107
				ucfirst($taxon[$criteres_label["nom vernaculaire"]]).'" sciName="'.$taxon[$criteres_label["nom scientifique"]].'" groupe="1">
139
				ucfirst($taxon[$criteres_label["nom vernaculaire"]]).'" sciName="'.$taxon[$criteres_label["nom scientifique"]].'" groupe="1">
108
			<DESCRIPTION>'.$infos_taxon["description"].'</DESCRIPTION>
140
			<DESCRIPTION>'.$infos_taxon["description"].'</DESCRIPTION>
109
			<PICTURES>';
141
			<PICTURES>';
110
			if ($infos_taxon["images"] != array()) {
142
			if ($infos_taxon["images"] != array()) {
111
				foreach ($infos_taxon["images"] as $image) {
143
				foreach ($infos_taxon["images"] as $image) {
112
					$xml .= '<PICTURE media="'.$image["binaire.href"].'"><author>'.$image["auteur.libelle"].'</author></PICTURE>';
144
					$xml .= '<PICTURE media="'.$image["binaire.href"].'"><author>'.$image["auteur.libelle"].'</author></PICTURE>';
113
				}
145
				}
114
			}
146
			}
115
			$xml .= '</PICTURES><CRITERIAS>';
147
			$xml .= '</PICTURES><CRITERIAS>';
116
			for ($i=3; $i < count($taxon); $i++) {
148
			for ($i=3; $i < count($taxon); $i++) {
117
				if (trim($taxon[$i]) !== "0") {
149
				if (trim($taxon[$i]) !== "0") {
118
					$xml .= '<VALUE code="1.'.$i.'.'.array_search(trim($taxon[$i]), $criteres_valeurs[$i]).'"/>';
150
					$xml .= '<VALUE code="1.'.$i.'.'.array_search(trim($taxon[$i]), $criteres_valeurs[$i]).'"/>';
119
				}
151
				}
120
			}
152
			}
121
			$xml .= '</CRITERIAS></TAXON>';
153
			$xml .= '</CRITERIAS></TAXON>';
122
		}
154
		}
123
		$xml .= "</TAXONS>";
155
		$xml .= "</TAXONS>";
124
		return $xml;
156
		return $xml;
125
	}
157
	}
126
	
158
	
127
	private function rechercherInfosTaxon($rest, $ns) {
159
	private function rechercherInfosTaxon($rest, $ns) {
128
		$info = array("description" => "", "images" => array());
160
		$info = array("description" => "", "images" => array());
129
		$reponse = $this->consulterWebService($rest, "bdtfx", "taxons", "?masque=".urlencode(rtrim($ns)));
161
		$reponse = $this->consulterWebService($rest, "bdtfx", "taxons", "?masque=".urlencode(rtrim($ns)));
130
		if (is_array($reponse["resultat"])) {
162
		if (is_array($reponse["resultat"])) {
131
			$id = key($reponse["resultat"]);
163
			$id = key($reponse["resultat"]);
132
		} else {
164
		} else {
133
			$reponse = $this->consulterWebService($rest, "bdtfx", "noms", "??retour.champs=nom_retenu.id&masque=".urlencode(rtrim($ns)));
165
			$reponse = $this->consulterWebService($rest, "bdtfx", "noms", "?retour.champs=nom_retenu.id&masque=".urlencode(rtrim($ns)));
134
			if (is_array($reponse["resultat"])) {
166
			if (is_array($reponse["resultat"])) {
135
				$id = $reponse["resultat"][key($reponse["resultat"])]["nom_retenu.id"];
167
				$id = $reponse["resultat"][key($reponse["resultat"])]["nom_retenu.id"];
136
			}
168
			}
137
		}
169
		}
138
		$reponse = $this->consulterWebService($rest, "coste", "textes", "/bdtfx.nn:".$id);
170
		$reponse = $this->consulterWebService($rest, "coste", "textes", "/bdtfx.nn:".$id);
139
		if ($reponse['texte'] != ""){
171
		if ($reponse['texte'] != ""){
140
			$info["description"] = str_replace("**", "", $reponse['texte']);
172
			$texte = str_replace("**", "", $reponse['texte']);
-
 
173
			$texte = str_replace("//", "", $texte);
-
 
174
			$texte = explode(" – ", $texte);
-
 
175
			unset($texte[0],$texte[1]);
-
 
176
			if (strpos($texte[2], ";") === false) {unset($texte[2]);} else {print_r($texte[2]);}
-
 
177
			
-
 
178
			if (preg_match('/^[\w|\s|\-|,]*\.*\s*$/', $texte[2]) == true) {print_r($texte[2]); unset($texte[2]);}
141
			$info["description"] = str_replace("//", "", $info["description"]);
179
			$info["description"] = implode(" – ", $texte);
142
		} else {
180
		} else {
143
			$reponse = $this->consulterWebService($rest, "baseflor", "informations", "/bdtfx.nn:".$id);
181
			$reponse = $this->consulterWebService($rest, "baseflor", "informations", "/bdtfx.nn:".$id);
144
			$info["description"] = $this->formaterBaseflor($reponse);
182
			$info["description"] = $this->formaterBaseflor($reponse);
145
		}
183
		}
146
		$reponse = $this->consulterWebService($rest, "cel", "images", "?navigation.limite=5&retour.format=CRS&masque.nn=".$id);
184
		$reponse = $this->consulterWebService($rest, "cel", "images", "?navigation.limite=5&retour.format=CRS&masque.nn=".$id);
147
		$info["images"] = $reponse["resultats"];
185
		$info["images"] = $reponse["resultats"];
148
		return $info;
186
		return $info;
149
	}
187
	}
150
	
188
	
151
	private function formaterBaseflor($reponse) {
189
	private function formaterBaseflor($reponse) {
152
		$description = "En cours de rédaction.";
190
		$description = "En cours de rédaction.";
153
		if ($reponse["idiotaxon"] != "") {
191
		if ($reponse["idiotaxon"] != "") {
154
			$description = $reponse["idiotaxon"]." – ".
-
 
155
							"Formation végétale : ".$reponse["form_vegetale"]."; ".
192
			$description = "Formation végétale : ".$reponse["form_vegetale"]."; ".
156
							"Inflorescence : ".$reponse["inflorescence"]."; ".
193
							"Inflorescence : ".$reponse["inflorescence"]."; ".
157
							"Couleur de la fleur : ".$reponse["couleur_fleur"]."; ".
194
							"Couleur de la fleur : ".$reponse["couleur_fleur"]."; ".
158
							"Sexualité : ".$reponse["sexualite"]."; ".
195
							"Sexualité : ".$reponse["sexualite"]."; ".
159
							"Fruit : ".$reponse["fruit"]."; ".
196
							"Fruit : ".$reponse["fruit"]."; ".
160
							"Pollinisation : ".$reponse["pollinisation"]."; ".
197
							"Pollinisation : ".$reponse["pollinisation"]."; ".
161
							"Dissémination : ".$reponse["dissemination"]."; ".
198
							"Dissémination : ".$reponse["dissemination"]."; ".
162
							"Ecologie : ".$reponse["carac_ecolo"]." – ".
199
							"Ecologie : ".$reponse["carac_ecolo"]." – ".
163
							"Chorologie : ".$reponse["chorologie"]."; ".
200
							"Chorologie : ".$reponse["chorologie"]."; ".
164
							"Floraison :  ".$reponse["floraison"];
201
							"Floraison :  ".$reponse["floraison"];
165
		}
202
		}
166
		return $description;
203
		return $description;
167
	}
204
	}
168
	
205
	
169
	private function consulterWebService($rest, $projet,$resssource,$parametres) {
206
	private function consulterWebService($rest, $projet,$resssource,$parametres) {
170
		$url_id = "http://www.tela-botanica.org/service:eflore:0.1/".$projet."/".$resssource.$parametres;
207
		$url_id = "http://www.tela-botanica.org/service:eflore:0.1/".$projet."/".$resssource.$parametres;
171
		$reponse = $rest->consulter($url_id);
208
		$reponse = $rest->consulter($url_id);
172
		return json_decode($reponse, true);
209
		return json_decode($reponse, true);
173
	}
210
	}
174
	
211
	
175
	
212
	
176
	private function recupererContenuFichier() {
213
	private function recupererContenuFichier() {
177
		$nomFichier = Config::get('dossierCsv').Config::get('projet');
214
		$nomFichier = Config::get('dossierCsv').Config::get('projet');
178
		if ($nomFichier && file_exists($nomFichier) ){
215
		if ($nomFichier && file_exists($nomFichier) ){
179
			$extensionFichier = strtolower(strrchr($nomFichier, '.'));
216
			$extensionFichier = strtolower(strrchr($nomFichier, '.'));
180
			if ($extensionFichier === ".csv"){
217
			if ($extensionFichier === ".csv"){
181
				$file = new SplFileObject($nomFichier);
218
				$file = new SplFileObject($nomFichier);
182
				$file->setFlags(SplFileObject::SKIP_EMPTY);
219
				$file->setFlags(SplFileObject::SKIP_EMPTY);
183
				$i = 0;
220
				$i = 0;
184
				echo "Traitement du fichier : ";
221
				echo "Traitement du fichier : ";
185
				while (!$file->eof()){
222
				while (!$file->eof()){
186
					$ligne_csv = $file->fgetcsv($delimiter = ';');
223
					$ligne_csv = $file->fgetcsv($delimiter = ';');
187
						$this->contenu_fichier[$i] = $ligne_csv;
224
						$this->contenu_fichier[$i] = $ligne_csv;
188
					echo str_repeat(chr(8), ( strlen( $i ) + 1 ))."\t".$i++;
225
					echo str_repeat(chr(8), ( strlen( $i ) + 1 ))."\t".$i++;
189
				}
226
				}
190
				echo "\n";
227
				echo "\n";
191
			} else {
228
			} else {
192
				$this->traiterErreur("Le fichier : $nomFichier n'est pas au format csv.");
229
				$this->traiterErreur("Le fichier : $nomFichier n'est pas au format csv.");
193
			}
230
			}
194
		} else {
231
		} else {
195
			$this->traiterErreur("Le fichier : $nomFichier n'existe pas.");
232
			$this->traiterErreur("Le fichier : $nomFichier n'existe pas.");
196
		}
233
		}
197
	}
234
	}
-
 
235
	
-
 
236
	public function supprimerAccents($chaine) {
-
 
237
		return str_replace($this->caracteresAccentues, $this->caracteresNormaux, $chaine);
-
 
238
	}
198
}
239
}
199
?>
240
?>