public function __construct($data = array(), $status = 200, $headers = array()) { parent::__construct(['rows' => $data], $status, $headers); }
/** * @param array|stdClass $data Note: $data will pass to response output without any checks * @param type $recordsFiltered * @param type $recordsTotal */ public function __construct($data = array(), $recordsFiltered = NULL, $recordsTotal = NULL) { parent::__construct($data, self::DATATABLES); if ($recordsFiltered !== NULL && $recordsTotal !== NULL && intval($recordsFiltered) && intval($recordsTotal)) { $this->recordsFiltered = $recordsFiltered; $this->recordsTotal = $recordsTotal; } }
/** */ public function __construct() { parent::__construct(); $this->responseObject->status = 'success'; }
public function __construct($data = array(), $status = 200, $headers = array()) { parent::__construct(['data' => $data, 'success' => true], $status, $headers); }