Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 921 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 921 Rev 922
Line 32... Line 32...
32
 
32
 
33
	public function setParametre($cle, $valeur) {
33
	public function setParametre($cle, $valeur) {
34
		$this->parametres[$cle] = $valeur;
34
		$this->parametres[$cle] = $valeur;
Line 35... Line -...
35
	}
-
 
36
 
-
 
37
	public function getParametresUrl() {
-
 
38
		if (!isset($this->partages['Parametres'])){
-
 
39
			$this->partages['Parametres'] = new Parametres($this->parametres['parametres'], $this->getBdd());
-
 
40
		}
-
 
41
		return $this->partages['Parametres'];
-
 
42
	}
-
 
43
 
-
 
44
	public function getParametresUrlVerificateur() {
-
 
45
		if (!isset($this->partages['ParametresVerificateur'])){
-
 
46
			$parametres = $this->getParametresUrl();
-
 
47
			$parametresAPI = $this->getParametreTableau('parametresAPI');
-
 
48
			$this->partages['ParametresVerificateur'] = new ParametresVerificateur($parametres, $parametresAPI);
-
 
49
		}
-
 
50
		return $this->partages['ParametresVerificateur'];
-
 
51
	}
-
 
52
 
-
 
53
	public function getRessourcesUrl() {
-
 
54
		if (!isset($this->partages['Ressources'])){
-
 
55
			$this->partages['Ressources'] = new Ressources($this->parametres['ressources']);
-
 
56
		}
-
 
57
		return $this->partages['Ressources'];
-
 
58
	}
-
 
59
 
-
 
60
	public function getRessourcesUrlVerificateur() {
-
 
61
		if (!isset($this->partages['RessourcesVerificateur'])){
-
 
62
			$ressources = $this->getRessourcesUrl();
-
 
63
			$projetsDispo = $this->getParametreTableau('projetsDispo');
-
 
64
			$servicesDispo = $this->getParametreTableau('servicesDispo');
-
 
65
			$this->partages['RessourcesVerificateur'] = new RessourcesVerificateur($ressources, $projetsDispo, $servicesDispo);
-
 
66
		}
-
 
67
		return $this->partages['RessourcesVerificateur'];
-
 
68
	}
-
 
69
 
-
 
70
	public function getUrlFormatage() {
-
 
71
		if (!isset($this->partages['UrlFormatage'])){
-
 
72
			$Bdd = $this->getBdd();
-
 
73
			$this->partages['UrlFormatage'] = new UrlFormatage($Bdd);
-
 
74
		}
-
 
75
		return $this->partages['UrlFormatage'];
-
 
76
	}
-
 
77
 
-
 
78
	public function getRequetesAssemblage() {
-
 
79
		if (!isset($this->partages['RequetesAssemblage'])){
-
 
80
			$this->partages['RequetesAssemblage'] =  new RequetesAssemblage($this->getBdd());
-
 
81
		}
-
 
82
		return $this->partages['RequetesAssemblage'];
-
 
83
	}
-
 
84
 
-
 
85
 
-
 
86
	public function getVersionVerificateur() {
-
 
87
		if (!isset($this->partages['VersionVerificateur'])){
-
 
88
			$ressources = $this->getRessourcesUrl();
-
 
89
			$parametres = $this->getParametresUrl();
-
 
90
			$versions = $this->getVersions();
-
 
91
			$this->partages['VersionVerificateur'] = new VersionVerificateur($ressources, $parametres, $versions);
-
 
92
		}
-
 
93
		return $this->partages['VersionVerificateur'];
-
 
94
	}
35
	}
95
 
36
 
96
	public function getBdd() {
37
	public function getBdd() {
97
		if (!isset($this->partages['Bdd'])){
38
		if (!isset($this->partages['Bdd'])){
98
			$this->partages['Bdd'] = new Bdd();
39
			$this->partages['Bdd'] = new Bdd();
Line 103... Line 44...
103
	public function getCacheSimple($options = array()) {
44
	public function getCacheSimple($options = array()) {
104
		$cache = new CacheSimple($options);
45
		$cache = new CacheSimple($options);
105
		return $cache;
46
		return $cache;
106
	}
47
	}
Line 107... Line -...
107
 
-
 
108
	public function getVersions() {
-
 
109
		if (!isset($this->partages['Versions'])){
-
 
110
			$parametres = $this->getParametresUrl();
-
 
111
			$ressources = $this->getRessourcesUrl();
-
 
112
			$bdd = $this->getBdd();
-
 
113
			$versions = new Versions($parametres,  $bdd);
-
 
114
			$this->partages['Versions'] = $versions;
-
 
115
		}
-
 
116
		return $this->partages['Versions'];
-
 
117
	}
-
 
118
 
48
 
119
	public function getWikipediaBot($options = array()) {
49
	public function getWikipediaBot($options = array()) {
120
		$wpBot = new WikipediaBot($options);
50
		$wpBot = new WikipediaBot($options);
121
		return $wpBot;
51
		return $wpBot;
Line 122... Line 52...
122
	}
52
	}
123
 
53
 
124
	public function getUrl($url) {
54
	public function getUrl($url) {
125
		$url = new Url($url);
55
		$url = new Url($url);
126
		return $url;
-
 
127
	}
-
 
128
 
-
 
129
	public function getServiceGenerique() {
-
 
130
		$ressources = $this->getRessourcesUrl();
-
 
131
		$classe = $ressources->getServiceClasse();
-
 
132
		$classeGenerique = $classe.'Generique';
-
 
133
		if ($ressources->getServiceNom() == 'noms' || $ressources->getServiceNom() == 'taxons') {
-
 
134
			$service = new $classeGenerique($this->getRessourcesUrl(), $this->getParametresUrl(), $this->getNomDao(), $this->getNomFormateur());
-
 
135
			if ($classe == 'NomsListe') {
-
 
136
				$service->setListeUrl($this->getParametre('listeUrl'));
-
 
137
			}
-
 
138
		} else if ($ressources->getServiceNom() == 'ontologies') {
-
 
139
			$service = new $classeGenerique($this->getRessourcesUrl(), $this->getParametresUrl(), $this->getOntologiesDao(), $this->getOntologiesFormateur());
-
 
140
			if ($classe == 'OntologiesListe') {
-
 
141
				$service->setListeUrl($this->getParametre('listeUrlOntologies'));
-
 
142
			}
-
 
143
		}
-
 
144
 
-
 
145
		return $service;
56
		return $url;
146
	}
57
	}
147
}
58
}