Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 208 Rev 215
Line 65... Line 65...
65
			$this->partages['RessourcesVerificateur'] = new RessourcesVerificateur($ressources, $projetsDispo, $servicesDispo);
65
			$this->partages['RessourcesVerificateur'] = new RessourcesVerificateur($ressources, $projetsDispo, $servicesDispo);
66
		}
66
		}
67
		return $this->partages['RessourcesVerificateur'];
67
		return $this->partages['RessourcesVerificateur'];
68
	}
68
	}
Line 69... Line 69...
69
 
69
 
70
	public function getProjet() {
70
	public function getBdd() {
71
		if (!isset($this->partages['Projet'])){
-
 
72
			$ressources = $this->getRessourcesUrl();
-
 
73
			$projet = new Projet($ressources);
-
 
74
			$projet->setCheminBase($this->getParametre('cheminBase'));
-
 
75
			$projet->setCheminConfig($this->getParametre('chemin_configurations'));
-
 
76
			$projet->setCheminBiblio($this->getParametre('chemin_bibliotheque'));
-
 
77
			$projet->initialiser();
-
 
78
			$projet->setParamsVerif($this->getParametresUrlVerificateur());
-
 
79
			$projet->setRessourcesVerif($this->getRessourcesUrlVerificateur());
71
		if (!isset($this->partages['Bdd'])){
80
			$this->partages['Projet'] = $projet;
72
			$this->partages['Bdd'] = new Bdd();
81
		}
73
		}
82
		return $this->partages['Projet'];
74
		return $this->partages['Bdd'];
Line 83... Line 75...
83
	}
75
	}
84
 
76
 
85
	public function getVersions() {
77
	public function getVersions() {
-
 
78
		if (!isset($this->partages['Versions'])){
86
		if (!isset($this->partages['Versions'])){
79
			$parametres = $this->getParametresUrl();
87
			$parametres = $this->getParametresUrl();
-
 
88
			$bdd = $this->getBdd();
80
			$ressources = $this->getRessourcesUrl();
89
			$projetNom = $this->getProjet()->getNom();
81
			$bdd = $this->getBdd();
90
			$versions = new Versions($parametres, $bdd, $projetNom);
82
			$versions = new Versions($parametres, $ressources, $bdd);
91
			$this->partages['Versions'] = $versions;
83
			$this->partages['Versions'] = $versions;
92
		}
84
		}
Line 93... Line 85...
93
		return $this->partages['Versions'];
85
		return $this->partages['Versions'];
94
	}
86
	}
-
 
87
 
-
 
88
	public function getProjet() {
-
 
89
		if (!isset($this->partages['Projet'])){
-
 
90
			$ressources = $this->getRessourcesUrl();
-
 
91
			$projet = new Projet($ressources);
-
 
92
			$projet->setCheminBase($this->getParametre('cheminBase'));
-
 
93
			$projet->setCheminConfig($this->getParametre('chemin_configurations'));
-
 
94
			$projet->setCheminBiblio($this->getParametre('chemin_bibliotheque'));
-
 
95
			$projet->initialiser();
95
 
96
			$projet->setParamsVerif($this->getParametresUrlVerificateur());
96
	public function getBdd() {
97
			$projet->setRessourcesVerif($this->getRessourcesUrlVerificateur());
97
		if (!isset($this->partages['Bdd'])){
98
			$projet->setServiceGenerique($this->getServiceGenerique());
98
			$this->partages['Bdd'] = new Bdd();
99
			$this->partages['Projet'] = $projet;
Line 99... Line 100...
99
		}
100
		}
100
		return $this->partages['Bdd'];
101
		return $this->partages['Projet'];
101
	}
102
	}
102
 
103
 
103
	public function getNomDao() {
-
 
104
		$ressources = $this->getRessourcesUrl();
104
	public function getNomDao() {
105
		$parametres = $this->getParametresUrl();
105
		$ressources = $this->getRessourcesUrl();
106
		$bdd = $this->getBdd();
106
		$parametres = $this->getParametresUrl();
107
		$projet = $this->getProjet();
107
		$bdd = $this->getBdd();
Line 108... Line 108...
108
		$versions = $this->getVersions();
108
		$versions = $this->getVersions();
109
		$nomDao = new NomDAO($ressources, $parametres, $bdd, $projet, $versions);
109
		$nomDao = new NomDAO($ressources, $parametres, $bdd, $versions);
Line 117... Line 117...
117
		$formateur->setDetailsHrefTpl($this->getParametre('detailsHrefTpl'));
117
		$formateur->setDetailsHrefTpl($this->getParametre('detailsHrefTpl'));
118
		$formateur->setOntologieHrefTpl($this->getParametre('ontologieHrefTpl'));
118
		$formateur->setOntologieHrefTpl($this->getParametre('ontologieHrefTpl'));
119
		return $formateur;
119
		return $formateur;
120
	}
120
	}
Line 121... Line 121...
121
 
121
 
-
 
122
	public function getServiceGenerique() {
-
 
123
		$classe = $this->getRessourcesUrl()->getServiceClasse();
122
	public function getService($classe) {
124
		$classeGenerique = $classe.'Generique';
123
		$service = new $classe($this->getRessourcesUrl(), $this->getParametresUrl(), $this->getNomDao(), $this->getNomFormateur());
125
		$service = new $classeGenerique($this->getRessourcesUrl(), $this->getParametresUrl(), $this->getNomDao(), $this->getNomFormateur());
124
		if ($service instanceof NomsListe) {
126
		if ($classe == 'NomsListe') {
125
			$service->setListeUrl($this->getParametre('listeUrl'));
127
			$service->setListeUrl($this->getParametre('listeUrl'));
126
		}
128
		}
127
		return $service;
129
		return $service;
128
	}
130
	}