ZF-8202: Inconsistency in setPluginLoader functionality in Zend_View_Abstract


Zend_View_Abstract is the only class that restricts usage to the defined Zend_Loader_PluginLoader. Other components like Zend_Form, Zend_Filter_Inflector, Zend_Controller_Action_HelperBroker allow usage of another defined pluginloader via the Zend_Loader_PluginLoader_Interface


{{Zend_View_Abstract::setPluginLoader()}} needs {{Zend_Loader_PluginLoader}} instead of {{Zend_Loader_PluginLoader_Interface}} because {{Zend_View_Abstract::getHelperPaths()}} is using a {{getPaths()}}-method that is not declared in the interface, so we cannot change this.

A way to solve this is to add {{getPaths()}} to {{Zend_Loader_PluginLoader_Interface}}, but this will break backwards compatibility.

Postponing to 2.0.

Zend_View_Abstract already correctly requires Zend_Loader_PluginLoader (and not the interface), so getPaths() must be defined in any plugin loader attached to the view helper.

That said, this should change in the future, but, also as noted, it cannot be done cleanly right now without a BC change.