/
escaper.php
42 lines (36 loc) · 1.21 KB
/
escaper.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/** Character escaper in a string
*
* \project Horn Framework <http://horn.lupusmic.org>
* \author Lupus Michaelis <mickael@lupusmic.org>
* \copyright 2013, Lupus Michaelis
* License AGPL <http://www.fsf.org/licensing/licenses/agpl-3.0.html>
*/
/*
* This file is part of Horn Framework.
*
* Horn Framework is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Horn Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero Public License for more details.
*
* You should have received a copy of the GNU Affero Public License
* along with Horn Framework. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace horn\lib;
use \horn\lib as h;
h\import('lib/object');
h\import('lib/regex');
interface escaper
{
function __construct(h\text $charset);
function do_escape(h\text $subject);
function do_unescape(h\text $subject);
}
h\import('lib/escaper/base');