here is an example of a Zend View Filter:
http://dev.bigace.org/api/3.0/Bigace_Zend/View_Filter/Bigace_Zend_View_Filter_ObfuscateMailto.html
It filters found mailto links and obfuscates them.
A Zend View Filter does something on an already rendered phtml file (= html code) before it is send to the client.
It's a Zend_Filter that can be used on the Zend View output.
Here is another example with code from:
http://www.phpgangsta.de/zend_view-output-filter-whitespaces-aus-html-entfernen
The filter class (filters whitespaces from html = less code to send):
<?php
class App_View_Filter_Minify implements Zend_Filter_Interface
{
public function filter($string)
{
return preg_replace(
array('/>\s+/', '/\s+</', '/[\r\n]+/'),
array('>', '<', ' '),
$string
);
}
}
And then adding the filter to the view:
/**
* Add Output filters to View
*
* @return void
*/
protected function _initViewFilter()
{
$view = $this->getResource('view');
$view->addFilterPath('App/View/Filter', 'App_View_Filter_')
->addFilter('Minify');
}