Skip to content

Commit 5367e21

Browse files
committed
Pulled up input_format, output_format, added method $excel->getOutputExtension()
1 parent 82e3cbe commit 5367e21

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/Imtigger/OneExcel/Writer/FPutCsvWriter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ class FPutCsvWriter extends OneExcelWriter implements OneExcelWriterInterface
99
public static $input_format_supported = [Format::CSV];
1010
public static $output_format_supported = [Format::CSV];
1111
public static $input_output_same_format = true;
12-
private $input_format;
13-
private $output_format;
1412
private $last_row = 0;
1513
private $data = [];
1614
private $temp_file;

src/Imtigger/OneExcel/Writer/LibXLWriter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ class LibXLWriter extends OneExcelWriter implements OneExcelWriterInterface
1414
private $book;
1515
/** @var \ExcelSheet $sheet */
1616
private $sheet;
17-
private $input_format;
18-
private $output_format;
1917

2018
public function create($output_format = Format::XLSX)
2119
{

src/Imtigger/OneExcel/Writer/OneExcelWriter.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ abstract class OneExcelWriter implements OneExcelWriterInterface
1010
public static $output_format_supported = [];
1111
public static $input_output_same_format;
1212

13+
protected $input_format;
14+
protected $output_format;
15+
1316
protected function isInputFormatSupported($format)
1417
{
1518
return in_array($format, static::$input_format_supported);
@@ -51,4 +54,9 @@ protected function getFormatMime($format)
5154

5255
throw new \Exception("Unknown format {$format}");
5356
}
57+
58+
public function getOutputExtension()
59+
{
60+
return $this->output_format;
61+
}
5462
}

src/Imtigger/OneExcel/Writer/PHPExcelWriter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ class PHPExcelWriter extends OneExcelWriter implements OneExcelWriterInterface
1616
private $book;
1717
/** @var \PHPExcel_Worksheet $sheet */
1818
private $sheet;
19-
private $input_format;
20-
private $output_format;
2119

2220
public function create($output_format = Format::XLSX)
2321
{

src/Imtigger/OneExcel/Writer/SpoutWriter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ class SpoutWriter extends OneExcelWriter implements OneExcelWriterInterface
1414
public static $input_output_same_format = false;
1515
/** @var AbstractMultiSheetsWriter $writer */
1616
private $writer;
17-
private $input_format;
18-
private $output_format;
1917
private $last_row = 0;
2018
private $data = [];
2119
private $temp_file;

0 commit comments

Comments
 (0)