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