Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 257 Rev 263
Line 23... Line 23...
23
		$this->type = $type;
23
		$this->type = $type;
24
		$this->numero = $numero;
24
		$this->numero = $numero;
25
		$this->largeur = $largeur;
25
		$this->largeur = $largeur;
26
	}
26
	}
Line 27... Line 27...
27
	
27
	
28
	public function getUrlImage() {
28
	public function getUrlDataSvg() {
29
		switch ($this->type) {
29
		switch ($this->type) {
30
			case 'nn' :
30
			case 'nn' :
31
				$nomTemplate = 'cartesParNnTpl';
31
				$nomTemplate = 'cartesParNnTpl';
32
			break;
32
			break;
33
			case 'nt' : 
33
			case 'nt' : 
34
				$nomTemplate = 'cartesParNtTpl';
34
				$nomTemplate = 'cartesParNtTpl';
35
			break;
35
			break;
36
		}
36
		}
-
 
37
		$tpl = Config::get($nomTemplate);
-
 
38
		$params = array($this->type => $this->numero, 'largeur' => $this->largeur, 'mime-type' => 'image/svg+xml');
-
 
39
		$url = $this->formaterUrl($tpl, $params);
-
 
40
		return $url;
-
 
41
	}
-
 
42
	
-
 
43
	public function getUrlPng() {
-
 
44
		switch ($this->type) {
-
 
45
			case 'nn' :
-
 
46
				$nomTemplate = 'cartesParNnTpl';
-
 
47
				break;
-
 
48
			case 'nt' :
-
 
49
				$nomTemplate = 'cartesParNtTpl';
-
 
50
				break;
-
 
51
		}
37
		$tpl = Config::get($nomTemplate);
52
		$tpl = Config::get($nomTemplate);
38
		$params = array($this->type => $this->numero, 'largeur' => $this->largeur);
53
		$params = array($this->type => $this->numero, 'largeur' => $this->largeur, 'mime-type' => 'image/png');
39
		$url = $this->formaterUrl($tpl, $params);
54
		$url = $this->formaterUrl($tpl, $params);
40
		return $url;
55
		return $url;
Line 41... Line 56...
41
	}
56
	}