src/DataTable.php
protected function sendData($data, $recordsFiltered, $recordsTotal)
    {
        $toJson = array(
            'draw' => intval($this->request['draw']),
            'recordsTotal' => intval($recordsTotal),
            'recordsFiltered' => intval($recordsFiltered),
            'data' => $this->dataOutput($data), );
        if (isset($this->toSend)) {
            $toJson = array_merge($this->toSend, $toJson);
        }
        exit(json_encode($toJson));
    }
protected function sendData($data, $recordsFiltered, $recordsTotal)
    {
        $toJson = array(
            'draw' => intval($this->request['draw']),
            'recordsTotal' => intval($recordsTotal),
            'recordsFiltered' => intval($recordsFiltered),
            'data' => $this->dataOutput($data), );
        if (isset($this->toSend)) {
            $toJson = array_merge($this->toSend, $toJson);
        }
        exit(json_encode($toJson));
    }
protected function sendData ( $ data , $ recordsFiltered , $ recordsTotal ) { $ toJson = array ( 'draw' => intval ( $ this -> request [ 'draw' ] ) , 'recordsTotal' => intval ( $ recordsTotal ) , 'recordsFiltered' => intval ( $ recordsFiltered ) , 'data' => $ this -> dataOutput ( $ data ) , ) ; if ( isset ( $ this -> toSend ) ) { $ toJson = array_merge ( $ this -> toSend , $ toJson ) ; } exit ( json_encode ( $ toJson ) ) ; }
Send the json encoded result for DataTables.js

@param array $data
@param int   $recordsFiltered
@param int   $recordsTotal

@return json output
Send the json encoded result for DataTables . js