ZF Oddity -- Or idiot programmer (most likely the latter)

Given: $element = new Zend_Form_Element_Text() ...

$element->addPrefixPath('Filter', 'Filter', 'filter');

$element->addFilter('jive');


print_r on $element->getPluginLoader('filter') results in 2 entries in the
array,
  1. Zend/Filter (library filters)
  2. Filter (my custom filters)

Thus: 

Zend_Loader_PluginLoader Object

(   
    [_prefixToPaths:protected] => Array
        (   
            [Zend_Filter_] => Array
                (   
                    [0] => Zend/Filter/
                )
            [Filter_] => Array
                (   
                    [0] => Filter/
                )
        )
    [_loadedPlugins:protected] => Array
        (
        )
    [_useStaticRegistry:protected] =>
)
+++++++++++++++++

Symptoms:

When I add jive, and jive alone, to my element, it works great( as in Tony
Tiger). All my input turns into jive (fo sho)

When I try to add additional filters, thus:

$element->addFilter('StringTrim'),

I consistently get error:
>>> Plugin by name  StringTrim was not found in the registry. 

What gives?
-- 
View this message in context: 
http://www.nabble.com/Oddity-with-Adding-Custom-Filters-to-form-elements-tp19096427p19096427.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to