Subversion Repositories eFlore/Applications.moissonnage

Rev

Rev 31 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
26 alex 1
<?php
2
 
3
class Maille {
4
 
5
	private $latitudeSud;
6
	private $longitudeOuest;
7
	private $latitudeNord;
8
	private $longitudeEst;
9
	private $indexLatitude;
10
	private $indexLongitude;
11
 
12
	private $points = array();
13
	private $nombrePoints = 0;
14
 
15
 
16
	public function __construct($sud, $ouest, $nord, $est, $indexLat, $indexLng) {
17
		$this->latitudeSud = $sud;
18
		$this->longitudeOuest = $ouest;
19
		$this->latitudeNord = $nord;
20
		$this->longitudeEst = $est;
21
		$this->indexLatitude = $indexLat;
22
		$this->indexLongitude = $indexLng;
23
	}
24
 
25
	public function ajouterPoint(& $point) {
26
		$this->points[] = $point;
27
		$this->nombrePoints ++;
28
	}
29
 
30
	public function getLatitudeNord() {
31
		return $this->latitudeNord;
32
	}
33
 
34
	public function getLongitudeOuest() {
35
		return $this->longitudeOuest;
36
	}
37
 
38
	public function getLatitudeSud() {
39
		return $this->latitudeSud;
40
	}
41
 
42
	public function getLongitudeEst() {
43
		return $this->longitudeEst;
44
	}
45
 
46
	public function getIndexLatitude() {
47
		return $this->indexLatitude;
48
	}
49
 
50
	public function getIndexLongitude() {
51
		return $this->indexLongitude;
52
	}
53
 
54
	public function getNombrePoints() {
55
		return $this->nombrePoints;
56
	}
57
 
58
	public function getPoint($index = 0) {
59
		return (!isset($this->points[$index])) ? NULL : $this->points[$index];
60
	}
61
 
62
	public function totalNonNul() {
63
		return !is_null($this->nombrePoints);
64
	}
65
 
66
}
67
 
68
?>