开发者

zend setDefaultNamespaces in the ini

开发者 https://www.devze.com 2023-04-12 09:28 出处:网络
how can I put this Zend_Filter::setDefaultNamespaces(array(\'App_Filter\')); in the in开发者_StackOverflow中文版i file ?

how can I put this

Zend_Filter::setDefaultNamespaces(array('App_Filter'));

in the in开发者_StackOverflow中文版i file ?

Thanks in advance.

Bye


Try something like this...

In your application.ini file, add

filterNamespaces.0 = "App_Filter"

then in your Bootstrap class

protected function _initFilterNamespaces()
{
    $namespaces = $this->getOption('filterNamespaces');
    Zend_Filter::setDefaultNamespaces($namespaces);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号