* Refactor readers to get a proper DI Similar to what was done with writers, readers also needed to be updated to match the new way of doing things. This commits promotes a better DI (factories, injection through constructors). * Escapers should not be singletons Instead, they should be proper object that can be injected where needed.
28 lines
604 B
PHP
28 lines
604 B
PHP
<?php
|
|
|
|
namespace Box\Spout\Common\Helper\Escaper;
|
|
|
|
/**
|
|
* Interface EscaperInterface
|
|
*
|
|
* @package Box\Spout\Common\Helper\Escaper
|
|
*/
|
|
interface EscaperInterface
|
|
{
|
|
/**
|
|
* Escapes the given string to make it compatible with PHP
|
|
*
|
|
* @param string $string The string to escape
|
|
* @return string The escaped string
|
|
*/
|
|
public function escape($string);
|
|
|
|
/**
|
|
* Unescapes the given string to make it compatible with PHP
|
|
*
|
|
* @param string $string The string to unescape
|
|
* @return string The unescaped string
|
|
*/
|
|
public function unescape($string);
|
|
}
|