This commit is contained in:
stubbfel
2013-06-27 10:55:07 +02:00
parent c03db748bc
commit 98b83dbfe3
15 changed files with 78 additions and 43 deletions

View File

@@ -36,34 +36,34 @@ class XmlManager {
private static $placeServiceElementName = "placeService";
/**
* Name for the placesap element
* Name for the ssap element
* @var string
*/
private static $placeSapElementName = "sap";
/**
* Name for the placerequest element
* Name for the request element
* @var string
*/
private static $placeRequestElementName = "request";
/**
* Name for the placeInfoName attribute
* Name for the placeInfoName attribute
* @var string
*/
private static $placeInfoName = "placeInformationName";
private static $placeInfoAttrName = "placeInformationName";
/**
* Name for the placeServiceName attribute
* @var string
*/
private static $placeServiceName = "placeServiceName";
private static $placeServiceAttrName = "placeServiceName";
/**
* Name for the placeid attribute
* @var string
*/
private static $placeIdAttrName = "id";
private static $placeIdAttrName = "id";
/**
* Name for the parent attribute
@@ -73,6 +73,8 @@ class XmlManager {
/**
* Method convert an array to a response xml for the sps service
* <place id ="4711" parentID=%0815"/>
*
* @param array[num][assoc] $result
* @return xml-string
*/
@@ -88,7 +90,11 @@ class XmlManager {
}
/**
* Method convert an array to a response xml for the pis service
* Method convert an array to a response xml for the pis service like
* <place id ="4711">
* <placeInformation placeInformationName = "key">Value</placeinformation>
* </place>
*
* @param array[num][assoc] $result
* @return xml-string
*/
@@ -110,13 +116,20 @@ class XmlManager {
// add placeinformation elment
$placeInfo = $place->addChild(XmlManager::$placeInfoElementName, utf8_encode($row[\database\PisSqlManager::$infValue]));
$placeInfo->addAttribute(XmlManager::$placeInfoName, $row[\database\PisSqlManager::$infName]);
$placeInfo->addAttribute(XmlManager::$placeInfoAttrName, $row[\database\PisSqlManager::$infName]);
}
return $xml->asXML();
}
/**
* Method convert an array to a response xml for the pss service
* <place id ="4711">
* <placeService placeServiceName = "key">
* <sap>sapValue</sap>
* <request>reqVaule</request>
* </placeService>
* </place>
*
* @param array[num][assoc] $result
* @return xml-string
*/
@@ -138,7 +151,7 @@ class XmlManager {
// add placeservice elment
$placeSrv = $place->addChild(XmlManager::$placeServiceElementName);
$placeSrv->addAttribute(XmlManager::$placeServiceName, $row[\database\PssSqlManager::$srvName]);
$placeSrv->addAttribute(XmlManager::$placeServiceAttrName, $row[\database\PssSqlManager::$srvName]);
$placeSrv->addChild(XmlManager::$placeSapElementName, $row[\database\PssSqlManager::$srvSap]);
$placeSrv->addChild(XmlManager::$placeRequestElementName, $row[\database\PssSqlManager::$srvRequest]);
}