Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 145 → Rev 146

/trunk/services/modules/0.1/Projets.php
100,7 → 100,11
$this->chargerConfigProjet();
 
// php5.3 : Enregistrement en première position des autoload de la méthode gérant les classes des services
spl_autoload_register(array($this, 'chargerClasseProjet'), true , true);
if (phpversion() < 5.3) {
spl_autoload_register(array($this, 'chargerClasseProjet'));
} else {
spl_autoload_register(array($this, 'chargerClasseProjet'), true , true);
}
}
 
private function chargerNomDuProjet() {
125,7 → 129,6
 
foreach ($chemins as $chemin) {
$chemin = $chemin.$classe.'.php';
print_r($chemin);
if (file_exists($chemin)) {
require_once $chemin;
}
165,11 → 168,6
$service = null;
foreach ($chemins as $chemin) {
if (file_exists($chemin)) {
if (phpversion() < 5.3) {
// L'option prepend de spl_autoload_register ne fonctionne pas avant php 5.3
// TODO : améliorer ce comportement!
require_once $chemin;
}
$service = new $classe($this->getBdd());
$ressourcesPourService = $this->filtrerRessourcesPourService();
$retour = $service->consulter($ressourcesPourService, $this->parametres);