예제 #1
0
 /**
  * Generate service output json format
  * @param ApiResult $result
  */
 public static function generateOutput($result)
 {
     assert('$result instanceof ApiResult');
     $output = $result->convertToArray();
     echo json_encode($output);
     return;
 }
예제 #2
0
 /**
  * Generate service output json format
  * @param ApiResult $result
  */
 public static function generateOutput($result)
 {
     assert('$result instanceof ApiResult');
     $data = $result->convertToArray();
     $xml = Array2XML::createXML('zurmoMessage', $data);
     echo $xml->saveXML();
     return;
 }