Subversion Repositories Applications.referentiel

Compare Revisions

Ignore whitespace Rev 37 → Rev 38

/trunk/bibliotheque/dao/ReferentielDao.php
23,21 → 23,28
*/
public function getReferentielsDispo() {
$url = $this->url_jrest.self::SERVICE."/Dispo";
$json = file_get_contents($url);
$json = $this->envoyerRequeteConsultation($url);
$noms = json_decode($json, true);
return $noms;
}
/**
* Retourne l'ensemble des information sur les colonnes d'une table.
* Retourne l'ensemble des information sur les noms d'un référentiel.
*
* @param string le nom de la table.
* @return array un tableau contenant les informations sur les colonnes de la table.
* @param string le code du référentiel.
* @return array un tableau contenant les informations sur les noms du référentiel.
*/
public function getTout($code_projet) {
$url = $this->url_jrest.self::SERVICE."/Tout/$code_projet";
$json = file_get_contents($url);
$noms = json_decode($json, true);
$nbre = $this->getNombre($code_projet);
$noms = array();
$pas = 1000;
for ($i = 0; $i < $nbre ; $i += $pas) {
$this->setLimitation($i, $pas);
$json = $this->envoyerRequeteConsultation($url);
$noms_partiel = json_decode($json, true);
$noms = array_merge($noms, $noms_partiel);
}
return $noms;
}
49,10 → 56,8
*/
public function getNombre($code_projet) {
$url = $this->url_jrest.self::SERVICE."/Nombre/$code_projet";
$json = file_get_contents($url);
$json = $this->envoyerRequeteConsultation($url);
$nbre = json_decode($json, true);
return $nbre;
}
}