Subversion Repositories eFlore/Applications.moissonnage

Compare Revisions

Ignore whitespace Rev 25 → Rev 26

/trunk/services/bibliotheque/Maille.php
New file
0,0 → 1,68
<?php
 
class Maille {
private $latitudeSud;
private $longitudeOuest;
private $latitudeNord;
private $longitudeEst;
private $indexLatitude;
private $indexLongitude;
private $points = array();
private $nombrePoints = 0;
public function __construct($sud, $ouest, $nord, $est, $indexLat, $indexLng) {
$this->latitudeSud = $sud;
$this->longitudeOuest = $ouest;
$this->latitudeNord = $nord;
$this->longitudeEst = $est;
$this->indexLatitude = $indexLat;
$this->indexLongitude = $indexLng;
}
public function ajouterPoint(& $point) {
$this->points[] = $point;
$this->nombrePoints ++;
}
public function getLatitudeNord() {
return $this->latitudeNord;
}
public function getLongitudeOuest() {
return $this->longitudeOuest;
}
public function getLatitudeSud() {
return $this->latitudeSud;
}
public function getLongitudeEst() {
return $this->longitudeEst;
}
public function getIndexLatitude() {
return $this->indexLatitude;
}
public function getIndexLongitude() {
return $this->indexLongitude;
}
public function getNombrePoints() {
return $this->nombrePoints;
}
public function getPoint($index = 0) {
return (!isset($this->points[$index])) ? NULL : $this->points[$index];
}
public function totalNonNul() {
return !is_null($this->nombrePoints);
}
}
 
?>