Studyon Minte9.com
ZF 1.0

Study

Overview



A filter is typically used for removing unwanted portions of input, and the desired portion of the input passes through as filter output.


# basic usage
$filter = new Zend_Filter_Alnum();
$return = $filter->filter('This is (my) content: 123'); 
	// return Thisismycontent123

#allowwhitespace
filter = new Zend_Filter_Alnum(array('allowwhitespace'=>true));
$return = $filter->filter('This is (my) content: 123'); // return This is my content 123

# static
$return = Zend_Filter::filterStatic('This is (my) content: 123', 'Alnum', array('allowwhitespace'=>true)); 
	// return This is my content 123


# example
$page = Zend_Filter_Int::filter($this->_getParam('page'));


http://framework.zend.com/manual/en/zend.filter.introduction.html