Issues

ZF-9225: Zend_Filter_Inflector:>setConfig() throws the exception 'Zend_Loader_PluginLoader_Exception'

Description

Zend_Filter_Inflector:>setConfig(), problem to set the option 'filterPrefixPath'. Zend_Filter_Inflector:>addFilterPrefixPath(), should be called before of Zend_Filter_Inflector:>addRules($value);

case


$options = array(
    'target' => ':controller/:action',
    'rules'  => array(
        ':action'     => 'Custom',
        ':controller' => 'Word_CamelCaseToDash'
    ),
    'filterPrefixPath' => array('My_Filter_' => 'My/Filter/')
);

new Zend_Filter_Inflector(new Zend_Config($options));

Will cause an exception because the configuration of the path is after setting the 'rules'. See line 508 in Zend_Filter_Inflector.

Comments

code reproduced in ZF-9225.zip

@Ramon: Why did you attach this issue manually to me?

Example and Description Header do not match... In non of your examples "setConfig()" is called.

This method is deprecated and will not be called by the Inflector itself.

@Thomas Attaches to you because you were looking at the issue ZF-8997 ;). With the resolution of the issue ZF-8997, Zend_Filter_Inflector:>setConfig() has become obsolete.

But this occurs in Zend_Filter_Inflector:> setOptions() also.

No problem


$options = array(
    'target' => ':controller/:action',
    'filterPrefixPath' => array('My_Filter_' => 'My/Filter/')
    'rules'  => array(
       ':action'     => 'Custom',
       ':controller' => 'Word_CamelCaseToDash'
     ), 
);
Zend_Filter_Inflector:>setOptions($options);

Problem


$options = array(
    'target' => ':controller/:action',
    'rules'  => array(
       ':action'     => 'Custom',
       ':controller' => 'Word_CamelCaseToDash'
     ),
    'filterPrefixPath' => array('My_Filter_' => 'My/Filter/')
);
Zend_Filter_Inflector:>setOptions($options);

Fixed with r21372