1 | <?php |
||
7 | class Escaper extends BaseEscaper implements EscaperInterface |
||
8 | { |
||
9 | /** @var array The special escaping types */ |
||
10 | private $specialEscapingTypes = array('script', 'style'); |
||
11 | |||
12 | /** @var array The urls attributes */ |
||
13 | private $urlsAttributes = array('href', 'src'); |
||
14 | |||
15 | /** @var bool Determine if html is escaped or not */ |
||
16 | private $escapeHtml = true; |
||
17 | |||
18 | /** @var bool Determine if html attributes are escaped or not */ |
||
19 | private $escapeHtmlAttr = true; |
||
20 | |||
21 | /** @var bool Determine if javascript is escaped or not */ |
||
22 | private $escapeJs = true; |
||
23 | |||
24 | /** @var bool Determine if css is escaped or not */ |
||
25 | private $escapeCss = true; |
||
26 | |||
27 | /** @var bool Determine if urls parameters are escaped or not */ |
||
28 | private $escapeUrl = true; |
||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | public function escapeAttributes(array $attributes) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function escape(ElementInterface $element) |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | public function escapeUrlParameter($parameter) |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | public function isEscapeHtml() |
||
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | public function setEscapeHtml($escapeHtml = true) |
||
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | public function isEscapeHtmlAttr() |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | public function setEscapeHtmlAttr($escapeHtmlAttr = true) |
||
115 | |||
116 | /** |
||
117 | * {@inheritdoc} |
||
118 | */ |
||
119 | public function isEscapeJs() |
||
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | public function setEscapeJs($escapeJs = true) |
||
133 | |||
134 | /** |
||
135 | * {@inheritdoc} |
||
136 | */ |
||
137 | public function isEscapeCss() |
||
141 | |||
142 | /** |
||
143 | * {@inheritdoc} |
||
144 | */ |
||
145 | public function setEscapeCss($escapeCss = true) |
||
151 | |||
152 | /** |
||
153 | * {@inheritdoc} |
||
154 | */ |
||
155 | public function isEscapeUrl() |
||
159 | |||
160 | /** |
||
161 | * {@inheritdoc} |
||
162 | */ |
||
163 | public function setEscapeUrl($escapeUrl = true) |
||
169 | |||
170 | /** |
||
171 | * {@inheritdoc} |
||
172 | */ |
||
173 | public function getUrlsAttributes() |
||
177 | } |
||
178 |