This commit is contained in:
stubbfel
2013-06-26 14:00:16 +02:00
parent 27604f0c3f
commit 34c0549ac8
12 changed files with 338 additions and 98 deletions

64
geoapi/api/PssApi.php Normal file
View File

@@ -0,0 +1,64 @@
<?php
namespace api;
include_once "../../global.inc.php";
include_once PATH_DATABASE . "/PssSqlManager.php";
include_once PATH_UTILITTY . "/XmlManager.php";
include_once PATH_UTILITTY . "/ArrayManager.php";
require_once PATH_API . "/Api.php";
/**
* This class provides some spezial SpsAPI methods
* @author stubbfel
* @since 20.06.2013
*/
class PssApi extends Api {
/**
* Route string for the alias paramter
* @var string
*/
public static $routeParameterPids = "/pid/:pid+";
/**
* max number of pid for each query
* @var int
*/
private $maxPid = 10;
/**
* Default-Constructor
*/
public function __construct() {
$this->sqlManager = new \database\PssSqlManager();
parent::__construct();
}
/**
* Default-DeConstructor
*/
public function __destruct() {
parent::__destruct();
}
/**
* Method start a pis-query
* @param array $queryArgs
* @return query result as xml
*/
public function sendPssQuery($queryArgs) {
$pidList = \utiliy\ArrayManager::removeEmptyItmes($queryArgs);
if (count($pidList) < $this->maxPid) {
$result = $this->sqlManager->sendPssQuery($pidList);
if ($result) {
return \utiliy\XmlManager::arrayToPssXml($result);
}
}
return NULL;
}
}
?>