spout/src/Spout/Common/Helper/Escaper/EscaperInterface.php
Adrien Loison b7e46740ce Refactor readers for better di (#457)
* 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.
2017-08-27 00:01:17 +02:00

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);
}