private $imgpath = null;
private $title = null;
private $description = null;
+ private $date = 0;
const err_lonlat_invalid = 1;
- function __construct ($id, $lon, $lat, $imgpath, $title, $description) {
+ function __construct ($id, $lon, $lat, $imgpath, $title, $description, $date) {
$this->imgpath = $imgpath;
// id
// description
$this->description = $description;
+ // date
+ $this->date = $date;
+
// longitude
if (!isset ($lon) || !is_numeric ($lon) ||
($lon < -180) || ($lon > 180)) {
*/
public function listfeatures();
+ /*
+ * returns the most recent features sorted by date. If $num_features is not
+ * defined or is null, returns all features sorted by date.
+ */
+ public function mostrecentfeatures($num_features);
+
/*
* returns true if a feature with imgpath exists
*/