@@ 383-389 (lines=7) @@ | ||
380 | case 'data-table': |
|
381 | $this->app->response->headers->set('Content-Type', 'application/json'); |
|
382 | return json_encode(array('data'=>$data)); |
|
383 | case 'csv': |
|
384 | $this->app->response->headers->set('Content-Type', 'text/csv'); |
|
385 | $path = $this->app->request->getPathInfo(); |
|
386 | $path = strrchr($path, '/'); |
|
387 | $path = substr($path, 1); |
|
388 | $this->app->response->headers->set('Content-Disposition', 'attachment; filename='.$path.'.csv'); |
|
389 | return $this->createCSV($data); |
|
390 | case 'csv2': |
|
391 | $this->app->response->headers->set('Content-Type', 'text/csv'); |
|
392 | $path = $this->app->request->getPathInfo(); |
|
@@ 390-396 (lines=7) @@ | ||
387 | $path = substr($path, 1); |
|
388 | $this->app->response->headers->set('Content-Disposition', 'attachment; filename='.$path.'.csv'); |
|
389 | return $this->createCSV($data); |
|
390 | case 'csv2': |
|
391 | $this->app->response->headers->set('Content-Type', 'text/csv'); |
|
392 | $path = $this->app->request->getPathInfo(); |
|
393 | $path = strrchr($path, '/'); |
|
394 | $path = substr($path, 1); |
|
395 | $this->app->response->headers->set('Content-Disposition', 'attachment; filename='.$path.'.csv'); |
|
396 | return $this->createCSV2($data); |
|
397 | case 'xml': |
|
398 | $this->app->response->headers->set('Content-Type', 'application/xml'); |
|
399 | return $this->createXML($data); |