CsvExport.class.php 602 B

12345678910111213141516171819202122232425
  1. <?php
  2. require_once(__DIR__.SLASH.'TextExport.class.php');
  3. class CsvExport extends TextExport{
  4. public $mime = 'application/csv';
  5. public $extension = 'csv';
  6. public $description = 'Fichier tableur générique';
  7. public function from_template($stream, $datas){
  8. return parent::from_template($stream, $datas);
  9. }
  10. public function end($stream){
  11. return utf8_decode($stream);
  12. }
  13. public function sample($dataset,$level = 0,$parent=''){
  14. return utf8_decode(parent::sample($dataset,$level));
  15. }
  16. public function formatValue($type,$value){
  17. if($type == 'image') return '';
  18. return $value;
  19. }
  20. }
  21. ?>