Exemplo n.º 1
0
 public static function displayWithJSON($json_object, $code = 200, $error = '')
 {
     header('Content-type: application/json');
     $json = array('code' => $code, 'result' => $json_object, 'error' => $error);
     $result = json_encode($json);
     echo $result;
     Clover::getLogger()->log("[RESPONSE] #" . Clover::$current_task_uuid . " " . $result);
     exit;
 }