I am not sure how this filter should work, because it is not clear from your question. In any case, I created a special filter that will check whether the value of the input file matches some $ token. If they are equal, then the input value will be an empty string.
The filter is as follows:
class My_Filter_Identical implements Zend_Filter_Interface {
protected $_token;
public function __construct($token = '') {
$this->_token = $token;
}
public function filter($value) {
if ($value !== $this->_token) {
return $value;
}
return '';
}
}
To apply it to a given form element:
require_once (APPLICATION_PATH . '/filters/Identical.php');
$el1->addFilter(new My_Filter_Identical('test'));
require_once , , .
:
pregReplace.
, , pregReplace:
$el1->addFilter('pregReplace',array('/test/',''));
, , , , . , , .