Issues

ZF-4325: Incorrect Zend_Form::setOptions documentation

Description

Zend_Form::setOptions() allow to configurate a form object via passing an array, but the documentation in 19.4.9 of manual is incorrect: - prefixPaths will be passed to addPrefixPaths() - elementPrefixPaths will be passed to addElementPrefixPaths() - displayGroupPrefixPaths will be passed to addDisplayGroupPrefixPaths() while code in the method is: if (isset($options['prefixPath'])) { $this->addPrefixPaths($options['prefixPath']); unset($options['prefixPath']); }

    if (isset($options['elementPrefixPath'])) { 
        $this->addElementPrefixPaths($options['elementPrefixPath']);
        unset($options['elementPrefixPath']);
    }

    if (isset($options['displayGroupPrefixPath'])) {                         
        $this->addDisplayGroupPrefixPaths($options['displayGroupPrefixPath']);
        unset($options['elementPrefixPath']);
    }

keys should be at singular: - prefixPath will be passed to addPrefixPaths() - elementPrefixPath will be passed to addElementPrefixPaths() - displayGroupPrefixPath will be passed to addDisplayGroupPrefixPaths() Since there's no docblock level documentation, this prevent a developer to use setOptions because it's not know which keys should be setted in the argument array.

Comments

Confirmed in source of Zend_Form current trunk and Manual o.O


Index: documentation/manual/en/module_specs/Zend_Form-Forms.xml
===================================================================
--- documentation/manual/en/module_specs/Zend_Form-Forms.xml    (Revision 21764)
+++ documentation/manual/en/module_specs/Zend_Form-Forms.xml    (Arbeitskopie)
@@ -2036,21 +2036,21 @@
         
-                    prefixPaths will be passed to
+                    prefixPath will be passed to
                     addPrefixPaths()
-                    elementPrefixPaths will be passed to
+                    elementPrefixPath will be passed to
                     addElementPrefixPaths()
-                    displayGroupPrefixPaths will be passed to
+                    displayGroupPrefixPath will be passed to
                     addDisplayGroupPrefixPaths()

Patch applied to trunk and 1.10 release branch.