Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 1309 → Rev 1310

/trunk/services/modules/0.1/plantuse/Textes.php
23,8 → 23,8
/* restore_error_handler();
error_reporting(E_ALL); */
class Textes {
private $plantuseurl = 'https://uses.plantnet-project.org/f/api.php?action=parse&format=json
&section=0&prop=wikitext&disabletoc=1&disableeditsection=1&disablelimitreport=1&page=';
private $plantuseurl = 'https://uses.plantnet-project.org/f/api.php?section=0&action=parse&format=json
&prop=wikitext&disabletoc=1&disableeditsection=1&disablelimitreport=1&page=';
private $parametres = array();
private $ressources = array();
79,9 → 79,24
return $masqueEntete;
}
private function definirValeurParDefautDesParametres() {
if (isset($this->parametres['retour']) == false) {
$this->parametres['retour'] = self::MIME_JSON;
}
if (isset($this->parametres['retour.format']) == false) {
$this->parametres['retour.format'] = 'min';
}
if (isset($this->parametres['navigation.depart']) == false) {
$this->parametres['navigation.depart'] = 0;
}
if (isset($this->parametres['navigation.limite']) == false) {
$this->parametres['navigation.limite'] = 100;
}
}
private function obtenirTextes() {
$retour = "";
$json = file_gets_content($this->plantuseurl.$this->parametres['retour.format']);
$json = file_gets_content($this->plantuseurl.$this->parametres['masque']);
if ($json != false) {
$tableau = json_decode($json);
if (isset($tableau['parse']['wikitext']['*'])) {