Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 146 → Rev 145

/trunk/services/modules/0.1/Projets.php
100,11 → 100,7
$this->chargerConfigProjet();
 
// php5.3 : Enregistrement en première position des autoload de la méthode gérant les classes des services
if (phpversion() < 5.3) {
spl_autoload_register(array($this, 'chargerClasseProjet'));
} else {
spl_autoload_register(array($this, 'chargerClasseProjet'), true , true);
}
spl_autoload_register(array($this, 'chargerClasseProjet'), true , true);
}
 
private function chargerNomDuProjet() {
129,6 → 125,7
 
foreach ($chemins as $chemin) {
$chemin = $chemin.$classe.'.php';
print_r($chemin);
if (file_exists($chemin)) {
require_once $chemin;
}
168,6 → 165,11
$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);