ODS writer

Added ODS writer
Refactored XLSX writer to abstract some pieces into an abstract multi-sheets writer
Created an abstract style helper
Moved shared components around
This commit is contained in:
Adrien Loison committed 2015-08-28 20:19:45 -07:00
1 parent a8f1fba854
commit 5949cb2442
39 files changed
+2924 -533

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
<?php
namespace Box\Spout\Common\Escaper;
/**
* Class ODS
* Provides functions to escape and unescape data for ODS files
*
* @package Box\Spout\Common\Escaper
*/
class ODS implements EscaperInterface
{
/**
* Escapes the given string to make it compatible with XLSX
*
* @param string $string The string to escape
* @return string The escaped string
*/
public function escape($string)
{
return htmlspecialchars($string, ENT_QUOTES);
}
/**
* Unescapes the given string to make it compatible with XLSX
*
* @param string $string The string to unescape
* @return string The unescaped string
*/
public function unescape($string)
{
return htmlspecialchars_decode($string, ENT_QUOTES);
}
}
+3 -2
View File
@@ -8,6 +8,7 @@ namespace Box\Spout\Common;
*/
abstract class Type
{
const CSV = "csv";
const XLSX = "xlsx";
const CSV = 'csv';
const XLSX = 'xlsx';
const ODS = 'ods';
}