ZF-2788: Add option to disable loading default decorators in Zend_Form


Currently, decorators for the various Zend_Form object are always loaded; default decorators exist and are loaded by default. In some cases, you may not want this: * If using Zend_Form in models for input filtering, and allowing re-purposing the model for use with a web service * When using Zend_Form::setElementDecorators() (no need to load decorators twice!) To accomplish this, a new flag should exist, 'loadDefaultDecorators'; when true (the default), the default decorators will be loaded; otherwise, they will not. Additionally, the protected _loadDefaultDecorators() method should be made public, to allow loading them on-demand.


Added new configuration flag, disableLoadDefaultDecorators. For instance:

$form = new Zend_Form(array('disableLoadDefaultDecorators' => true));

$element = new Zend_Form_Element('foo', array('disableLoadDefaultDecorators' => true));

$form->addDisplayGroup(array('foo', 'bar'), 'foobar', array('disableLoadDefaultDecorators' => true));

Available in trunk and 1.5 release branch.