I do not understand how I can send an array with options to my custom filter. Can you please help me?
class Core_Filter_MyFilter implements Zend_Filter_Interface
{
public function __construct($options = null)
...
}
class Blog_Form_Comment extends Zend_Form
{
public function init()
{
$this->setMethod('post');
$this->addElementPrefixPath('Core_Filter', 'Core/Filter/', 'filter');
$this->addElement('textarea', 'entry', array(
'filters' => array(MyFilter)));
I have tried several different ways and I have only managed to send a string as a option to the constructor, but I need to be able to send an array.