add seiralmanager #66

This commit is contained in:
stubbfel
2013-07-01 17:47:45 +02:00
parent 802b561187
commit aa03fdcd1b
10 changed files with 83 additions and 23 deletions

View File

@@ -3,13 +3,14 @@
namespace utiliy;
include_once "../../global.inc.php";
require_once PATH_UTILITTY . "/SerialManager.php";
/**
* The XmlManager provides some xml-methods
* @author stubbfel
* @since 25.06.2013
*/
class JsonManager {
class JsonManager implements SerialManager {
/**
* Name for the sap item
@@ -93,7 +94,7 @@ class JsonManager {
// add placeinformation item
$placeInfo = array(JsonManager::$placeInfoName => $row[\database\PisSqlManager::$infName],
JsonManager::$placeInfoValueName => utf8_encode($row[\database\PisSqlManager::$infValue]));
JsonManager::$placeInfoValueName => utf8_encode($row[\database\PisSqlManager::$infValue]));
array_push($place, $placeInfo);
}
return json_encode($infos);
@@ -130,6 +131,18 @@ class JsonManager {
return json_encode($services);
}
public function arrayToSps($result) {
return JsonManager::arrayToSpsJson($result);
}
public function arrayToPss($result) {
return JsonManager::arrayToPssJson($result);
}
public function arrayToPis($result) {
return JsonManager::arrayToPisJson($result);
}
}
?>