"; /** * Name for the place element * @var string */ public static $placeElementName = "place"; /** * Name for the placeid attribute * @var string */ public static $placeIdAttrName = "id"; /** * Name for the parent attribute * @var string */ public static $parentIdAttrName = "parentId"; /** * Method convert an array to a response xml for the sps service * @param array[num][assoc] $result * @return xml-string */ public static function arrayToSpsXml($result = array()) { $xml = new \SimpleXMLElement(XmlManager::$defaultXmlDoc); foreach ($result as $row) { $place = $xml->addChild(XmlManager::$placeElementName); $place->addAttribute(XmlManager::$placeIdAttrName, $row[\database\SpsSqlManager::$placeId]); $place->addAttribute(XmlManager::$parentIdAttrName, $row[\database\SpsSqlManager::$parentId]); } return $xml->asXML(); } } ?>