Esempio n. 1
0
 /**
  * Given a set of conditions, fetch all matching layers from the given database
  * connection and return them in an array
  *
  * @param Database $db
  * @param array $conditions
  *
  * @return array|false
  */
 protected static function loadMembersFromConds($db, $conditions)
 {
     $results = array();
     $res = self::fetchMembersFromConds($db, $conditions);
     if ($res) {
         // load all matching layer objects into the layer group:
         foreach ($res as $row) {
             if ($row) {
                 $obj = MapsLayers::newLayerFromRow($row);
                 $results[] = $obj;
             }
         }
         $res->free();
         return $results;
     }
     return false;
 }