Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 214 → Rev 215

/trunk/services/bibliotheque/Conteneur.php
67,6 → 67,24
return $this->partages['RessourcesVerificateur'];
}
 
public function getBdd() {
if (!isset($this->partages['Bdd'])){
$this->partages['Bdd'] = new Bdd();
}
return $this->partages['Bdd'];
}
 
public function getVersions() {
if (!isset($this->partages['Versions'])){
$parametres = $this->getParametresUrl();
$ressources = $this->getRessourcesUrl();
$bdd = $this->getBdd();
$versions = new Versions($parametres, $ressources, $bdd);
$this->partages['Versions'] = $versions;
}
return $this->partages['Versions'];
}
 
public function getProjet() {
if (!isset($this->partages['Projet'])){
$ressources = $this->getRessourcesUrl();
77,36 → 95,18
$projet->initialiser();
$projet->setParamsVerif($this->getParametresUrlVerificateur());
$projet->setRessourcesVerif($this->getRessourcesUrlVerificateur());
$projet->setServiceGenerique($this->getServiceGenerique());
$this->partages['Projet'] = $projet;
}
return $this->partages['Projet'];
}
 
public function getVersions() {
if (!isset($this->partages['Versions'])){
$parametres = $this->getParametresUrl();
$bdd = $this->getBdd();
$projetNom = $this->getProjet()->getNom();
$versions = new Versions($parametres, $bdd, $projetNom);
$this->partages['Versions'] = $versions;
}
return $this->partages['Versions'];
}
 
public function getBdd() {
if (!isset($this->partages['Bdd'])){
$this->partages['Bdd'] = new Bdd();
}
return $this->partages['Bdd'];
}
 
public function getNomDao() {
$ressources = $this->getRessourcesUrl();
$parametres = $this->getParametresUrl();
$bdd = $this->getBdd();
$projet = $this->getProjet();
$versions = $this->getVersions();
$nomDao = new NomDAO($ressources, $parametres, $bdd, $projet, $versions);
$nomDao = new NomDAO($ressources, $parametres, $bdd, $versions);
return $nomDao;
}
 
119,9 → 119,11
return $formateur;
}
 
public function getService($classe) {
$service = new $classe($this->getRessourcesUrl(), $this->getParametresUrl(), $this->getNomDao(), $this->getNomFormateur());
if ($service instanceof NomsListe) {
public function getServiceGenerique() {
$classe = $this->getRessourcesUrl()->getServiceClasse();
$classeGenerique = $classe.'Generique';
$service = new $classeGenerique($this->getRessourcesUrl(), $this->getParametresUrl(), $this->getNomDao(), $this->getNomFormateur());
if ($classe == 'NomsListe') {
$service->setListeUrl($this->getParametre('listeUrl'));
}
return $service;