Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 876 | Rev 1058 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 876 Rev 961
Line 33... Line 33...
33
				'ethnobotanique','bibliographie','statut','ecologie');
33
				'ethnobotanique','bibliographie','statut','ecologie');
34
		$cache = array();
34
		$cache = array();
Line 35... Line 35...
35
		
35
		
36
		$nt = $this->conteneur->getNomCourant()->getNomRetenu()->get('num_taxonomique');
36
		$nt = $this->conteneur->getNomCourant()->getNomRetenu()->get('num_taxonomique');
-
 
37
		$donnees['infos'] = array('referentiel' => $this->conteneur->getParametre('referentiel'), 'num_tax' => $nt);
37
		$donnees['infos'] = array('referentiel' => $this->conteneur->getParametre('referentiel'), 'num_tax' => $nt);
38
		$referentiel = $this->conteneur->getParametre('referentiel');
38
		foreach ($blocs as $bloc) {
39
		foreach ($blocs as $bloc) {
39
			$cache_bloc = Config::get('cache') ? $this->obtenirCache($bloc.'_bloc_'.$num_nom) : null;
40
			$cache_bloc = Config::get('cache') ? $this->obtenirCache($bloc.'/bloc/'.$referentiel.'_'.$num_nom) : null;
40
			if($cache_bloc != null) {
41
			if($cache_bloc != null) {
41
				$donnees[$bloc] = $cache_bloc;
42
				$donnees[$bloc] = $cache_bloc;
42
			} else {
43
			} else {
43
				$nom_classe = ucfirst($bloc);
44
				$nom_classe = ucfirst($bloc);
44
				$classe = new $nom_classe($this->conteneur);
45
				$classe = new $nom_classe($this->conteneur);
45
				$donnees[$bloc] = $classe->getBloc();
46
				$donnees[$bloc] = $classe->getBloc();
46
				if(!empty($donnees[$bloc])) {
47
				if(!empty($donnees[$bloc])) {
47
					$this->mettreEnCache($bloc.'_bloc_'.$num_nom, $donnees[$bloc]);
48
					$this->mettreEnCache($bloc.'/bloc/'.$referentiel.'_'.$num_nom, $donnees[$bloc]);
48
				}
49
				}
49
			}
50
			}
50
		}
51
		}
51
		return $donnees;
52
		return $donnees;