我不明白如何将包含选项的数组发送到我的自定义过滤器。你能帮我么?Zend_Framework:将数组选项传递给自定义过滤器
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)));
我已经尝试了几种不同的方式,我只设法送一个字符串作为一个选项,构造函数,但我需要能够发送的数组。
谢谢你的伟大的答案。 – unkownt 2009-08-13 12:04:25