ZF-12107: Zend_Filter_CharConverter
Description
Hello, recently I made a filter called "CharConverter" doing a job of converting special characters to another similar character.
Below is an example of implementation;
h3. Examples
$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
$filter2 = new Zag_Filter_CharConvert('UTF-8', 'en_US', '-');
echo $filter2->filter('éééé ááááá 90');//eeee-aaaaa-90
$filter3 = new Zag_Filter_CharConvert();
echo $filter3->filter('éééé ááááá 90');//eeee aaaaa 90
With this filter is very easy to convert text into friendly url for example.
well, that's it, I do not know if this is in accordance with the Zend but if you would like to help in the development.
Note: The plugin was not implemented with namespaces (Zend\Filter), they still did it to version 1.11.10, but I can adapt easily to the ZF2
thanks!
Comments
Posted by Frank Brückner (frosch) on 2012-03-20T08:35:36.000+0000
Code tags added.
Posted by Frank Brückner (frosch) on 2012-03-20T08:38:55.000+0000
Hi Bruno, nice idea! :-)
Do you have a Github account or something similar, where we can see the code?
Includes your code unit tests?
Posted by Bruno Thiago Leite Agutoli (btlagutoli) on 2012-03-22T00:19:48.000+0000
Hi, I climbed up the project in "github" https://github.com/agutoli/…