Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?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);
}
}
?>