Manipulate with query result

Added public var $queryResult. Added two public methods:
generateResult() and produceOutputFromResult().
Now Datatables can be
called in another way:

  $this->load->library("Datatables");

$this->datatables
  ->select("id as DT_RowId, email, last_login")

->from('user');
  // echo $this->datatables->generate();
  $raw_data =
$this->datatables->generateResult();
  foreach ($raw_data->result() as
$row) {
    $row->last_login_display = date('d.m.Y H:i',
strtotime($row->last_login));
  }
   $res =
$this->datatablesb->produceOutputFromResult();
   echo $res;