|
|
@@ -66,6 +66,22 @@ class Api_WpsV1_GetCapabilities { // TODO: ...
|
|
|
exit;
|
|
|
}
|
|
|
|
|
|
+ static function sendGetCapabilitiesHtml($wpsServerUrl, $serviceTitle, $serviceDescription, $wpsProcessList) {
|
|
|
+ header('Content-type: text/html; charset=utf-8');
|
|
|
+ Lib::loadClass('UI');
|
|
|
+ UI::layout(function () use ($wpsServerUrl, $serviceTitle, $serviceDescription, $wpsProcessList) {
|
|
|
+ echo UI::h('h1', [], "WPS GetCapabilities (v 1.0.0)");
|
|
|
+ UI::setTitle("WPS GetCapabilities (v 1.0.0)");
|
|
|
+ echo UI::h('ul', [], array_map(function ($wpsProcess) {
|
|
|
+ return UI::h('li', [], [
|
|
|
+ UI::h('a', [ 'href' => "wps.php?SERVICE=WPS&REQUEST=DescribeProcess&VERSION=1.0.0&IDENTIFIER={$wpsProcess->identifier}" ], $wpsProcess->identifier),
|
|
|
+ UI::h('span', [ 'style' => "margin-left: 6px; color:silver" ], $wpsProcess->title),
|
|
|
+ UI::h('pre', [ 'style' => "display:none" ], var_export($wpsProcess, true)),
|
|
|
+ ]);
|
|
|
+ }, $wpsProcessList));
|
|
|
+ }, [ 'showMenu' => false ]);
|
|
|
+ }
|
|
|
+
|
|
|
static function sendGetCapabilitiesXml($wpsServerUrl, $serviceTitle, $serviceDescription, $wpsProcessList) {
|
|
|
header('Content-type: application/xml; charset=utf-8');
|
|
|
$xmlWriter = new Core_XmlWriter();
|
|
|
@@ -192,7 +208,7 @@ class Api_WpsV1_GetCapabilities { // TODO: ...
|
|
|
// </wps:Languages>
|
|
|
// </wps:Capabilities>
|
|
|
$xmlWriter->h('wps:ProcessOfferings', array_map(function ($wpsProcess) {
|
|
|
- return [ 'wps:Process', [ 'wps:processVersion' => $wpsProcess->version ], [
|
|
|
+ return [ 'wps:Process', [ 'wps:processVersion' => $wpsProcess->processVersion ], [
|
|
|
[ 'ows:Identifier', $wpsProcess->identifier ],
|
|
|
[ 'ows:Title', $wpsProcess->title ],
|
|
|
[ 'ows:Abstract', $wpsProcess->description ],
|