-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
41 lines (25 loc) · 1.02 KB
/
README
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
São Paulo, 20 October 2011 10:33 GMT
Zag Filter CharConvert
======================
The CharConverter is a simple plugin that does the conversion from UTF-8 to
ASCII removing accents and other characters not used in English for example.
In situations where this filter could be useful?
===============================================
The CharConverter to be useful for example to create friendly URL's as shown in
the example below;
Examples
----------------------
1) Passing parameter as array
$filter1 = new Zag_Filter_CharConvert(array(
'replaceWhiteSpace' => '-',
'locale' => 'en_US',
'charset'=> 'UTF-8'
));
echo $filter1->filter('ééé ááá 90');//eee-aaa-90
echo $filter1->filter('óóó 10aáééé');//ooo-10aaeee
2) Passing parameter as arguments
$filter2 = new Zag_Filter_CharConvert('UTF-8', 'en_US', '-');
echo $filter2->filter('éééé ááááá 90');//eeee-aaaaa-90
3) Using default behavior
$filter3 = new Zag_Filter_CharConvert();
echo $filter3->filter('éééé ááááá 90');//eeee aaaaa 90