]> dev.renevier.net Git - syp.git/blobdiff - inc/db/anydb.php
rss feed
[syp.git] / inc / db / anydb.php
index 47d9a06dc3a154b9870aa0ddfd28affc6445caee..bb80032a274eb3e4b898728f24f80c2e3c29b394 100644 (file)
@@ -9,10 +9,11 @@ class feature {
     private $imgpath = null;
     private $title = null;
     private $description = null;
     private $imgpath = null;
     private $title = null;
     private $description = null;
+    private $date = 0;
 
     const err_lonlat_invalid = 1;
 
 
     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
         $this->imgpath = $imgpath;
 
         // id
@@ -26,6 +27,9 @@ class feature {
         // description
         $this->description = $description;
 
         // description
         $this->description = $description;
 
+        // date
+        $this->date = $date;
+
         // longitude
         if (!isset ($lon) || !is_numeric ($lon) ||
              ($lon < -180) || ($lon > 180)) {
         // longitude
         if (!isset ($lon) || !is_numeric ($lon) ||
              ($lon < -180) || ($lon > 180)) {
@@ -118,6 +122,12 @@ interface anydbConnection {
      */
     public function listfeatures();
 
      */
     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
      */
     /*
      * returns true if a feature with imgpath exists
      */