Files
geodb/geoapi/service/pss/index.php
2013-07-10 12:48:18 +02:00

28 lines
806 B
PHP

<?php
include_once "../../global.inc.php";
require_once PATH_API . "/PssApi.php";
// get reguest header
$headers = apache_request_headers();
// instance a new api
$app = new \api\PssApi($headers);
// HTTP-Get-Method
$app->get(\api\PssApi::$routeParameterPids . \api\PssApi::$routeParameterSNames, function ($pid, $sNames = array()) use ($app) {
$queryArgs = array();
$queryArgs[\api\PssApi::$keyPidList] = $pid;
$queryArgs[\api\PssApi::$keySNameList] = $sNames;
echo $app->sendPssQuery($queryArgs);
});
$app->get(\api\PssApi::$routeParameterPids, function ($pid) use ($app) {
$queryArgs = array();
$queryArgs[\api\PssApi::$keyPidList] = $pid;
echo $app->sendPssQuery($queryArgs);
});
$app->run();
?>