Skip to content

Filter plugin for Zend Framework that makes conversion caracters

License

Notifications You must be signed in to change notification settings

agutoli/CharConvert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Filter plugin for Zend Framework that makes conversion caracters

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages