浏览代码

added resolve and resolveDepth GET param in GetFeature

Piotr Labudda 8 年之前
父节点
当前提交
1b07891ac1
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      SE/se-lib/Api/WfsServerBase.php

+ 4 - 0
SE/se-lib/Api/WfsServerBase.php

@@ -109,6 +109,8 @@ class Api_WfsServerBase {
 		$args['wfs:featureID'] = null;// @from: featureID, featureId (featureid)
 		$args['primaryKey'] = null;// primaryKey type - @from: featureID or $req[primaryKey]
 		$args['outputBlobFormat'] = V::get('outputBlobFormat', 'base64', $rawArgs); // how to print blob fields ('base64', 'link') - default base64
+		$args['resolve'] = V::get('resolve', '', $rawArgs);
+		$args['resolveDepth'] = V::get('resolveDepth', 0, $rawArgs, 'int'); // TODO: if ('*' === resolveDepth) - recurse resolve
 
 		$lowerArgs = array(); foreach ($rawArgs as $name => $value) $lowerArgs[ strtolower($name) ] = trim($value);
 
@@ -139,6 +141,8 @@ class Api_WfsServerBase {
 						$args['filterFields'][] = $fieldXpath;
 					}
 				}
+			} else if ($args['resolve'] && $args['resolveDepth'] > 0) {
+				$args['filterFields'][] = '*' . str_repeat("/*", $args['resolveDepth'] - 1);
 			}
 		}