1 | <?php |
||
13 | class ODS implements EscaperInterface |
||
14 | { |
||
15 | use Singleton; |
||
16 | |||
17 | /** @var string Regex pattern to detect control characters that need to be escaped */ |
||
18 | protected $escapableControlCharactersPattern; |
||
19 | |||
20 | /** |
||
21 | * Initializes the singleton instance |
||
22 | */ |
||
23 | 3 | protected function init() |
|
27 | |||
28 | /** |
||
29 | * @return string Regex pattern containing all escapable control characters |
||
30 | */ |
||
31 | 3 | protected function getEscapableControlCharactersPattern() |
|
41 | |||
42 | /** |
||
43 | * Escapes the given string to make it compatible with XLSX |
||
44 | * |
||
45 | * @param string $string The string to escape |
||
46 | * @return string The escaped string |
||
47 | */ |
||
48 | 111 | public function escape($string) |
|
62 | |||
63 | /** |
||
64 | * Unescapes the given string to make it compatible with XLSX |
||
65 | * |
||
66 | * @param string $string The string to unescape |
||
67 | * @return string The unescaped string |
||
68 | */ |
||
69 | 78 | public function unescape($string) |
|
73 | } |
||
74 |