4 * A simple JSON Response class.
7 public $success, $data, $message, $errors, $tid, $trace;
9 public function __construct($params = array()) {
10 $this->success = isset($params["success"]) ? $params["success"] : false;
11 $this->message = isset($params["message"]) ? $params["message"] : '';
12 $this->data = isset($params["data"]) ? $params["data"] : array();
15 public function to_json() {
16 return json_encode(array(
17 'success' => $this->success,
18 'message' => $this->message,