Преглед изворни кода

added outputFormat raw for testing in Wfs Data Server

Piotr Labudda пре 10 година
родитељ
комит
e51f837d5b
1 измењених фајлова са 9 додато и 8 уклоњено
  1. 9 8
      SE/se-lib/Api/WfsData.php

+ 9 - 8
SE/se-lib/Api/WfsData.php

@@ -84,9 +84,7 @@ class Api_WfsData extends ApiRouteBase {// TODO: extends Api_WfsBase which exten
 		$this->DBG("WfsServer(" . $this->_apiUser->getID() . ") ...", __LINE__);
 		$wfsServer = new Api_WfsDataServer($userAcl);
 		$wfsServer->setBaseUri($this->_apiBaseUri);
-		
-		
-		
+
 		if ('WFS' != V::get('SERVICE', '', $request->query) and ('WFS' != V::get('service', '', $request->query)))  {
 			throw new Api_WfsException("Only WFS Service is allowed");
 		}
@@ -109,11 +107,14 @@ class Api_WfsData extends ApiRouteBase {// TODO: extends Api_WfsBase which exten
 		}
 		IF(V::get('DBG','',$_GET)){echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;text-align:left;">$document (' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($document);echo'</pre>';}
 
-		header('Content-type: application/xml');
-		echo $document; exit;// TODO: return $document;
-
-		exit;
-		// TODO: return $document;
+		if ('raw' == V::get('outputFormat', '', $request->query)) {
+			header('Content-type: text/plain; charset=utf-8');
+			echo $document;
+		} else {
+			header('Content-type: application/xml');
+			echo $document;
+		}
+		exit;// TODO: return $document;
 	}
 
 	public function mainWpsAction($request) {