Subversion Repositories eFlore/Applications.moissonnage

Compare Revisions

Ignore whitespace Rev 18 → Rev 19

/trunk/services/modules/0.1/commun/Maille.php
New file
0,0 → 1,74
<?php
 
class Maille {
private $latitudeSud;
private $longitudeOuest;
private $latitudeNord;
private $longitudeEst;
private $points;
private $nombrePoints = NULL;
private $indexLatitude;
private $indexLongitude;
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;
$this->points = array();
}
public function ajouterPoint($point) {
$this->points[] = $point;
}
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() {
if (!is_null($this->nombrePoints))
return $this->nombrePoints;
return count($this->points);
}
public function setNombrePoints($nombrePoints) {
$this->nombrePoints = $nombrePoints;
}
public function getPoint($index = 0) {
return (!isset($this->points[$index])) ? NULL : $this->points[$index];
}
public function totalNonNul() {
return !is_null($this->nombrePoints);
}
}
 
?>