Zend Framework

Zend_Filter_Inflector:>setConfig() throws the exception 'Zend_Loader_PluginLoader_Exception'

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.10.1
  • Fix Version/s: 1.10.3
  • Component/s: Zend_Filter_Inflector
  • Labels:
    None

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.

Issue Links

Activity

Hide
Ramon Henrique Ornelas added a comment -

code reproduced in ZF-9225.zip

Show
Ramon Henrique Ornelas added a comment - code reproduced in ZF-9225.zip
Hide
Thomas Weidner added a comment -

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

Show
Thomas Weidner added a comment - @Ramon: Why did you attach this issue manually to me?
Hide
Thomas Weidner added a comment -

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.

Show
Thomas Weidner added a comment - 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.
Hide
Ramon Henrique Ornelas added a comment -

@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);
Show
Ramon Henrique Ornelas added a comment - @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);
Hide
Thomas Weidner added a comment -

Fixed with r21372

Show
Thomas Weidner added a comment - Fixed with r21372

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: