Browse Source

ZF-11152
Zend_Form
English Manual
Documentation addition to describe the possible return values of getFileName() on Zend_Form_Element_File


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23963 44c647ce-9c0f-0410-b52a-842ac1e357ba

adamlundrigan 14 năm trước cách đây
mục cha
commit
37f2950314

+ 24 - 0
documentation/manual/en/module_specs/Zend_Form-StandardElements.xml

@@ -253,6 +253,30 @@ $location = $form->foo->getFileName();
                 the file.
             </para>
         </note>
+        
+        <note>
+            <title>Return value of getFileName()</title>
+
+            <para>
+                The result returned by the getFileName() method will change depending on how many files the Zend_Form_Element_File uploaded:
+            <itemizedlist>
+                <listitem>
+                    <para>
+                        A single file: string containing the single file name.
+                    </para>
+                </listitem>
+                <listitem>
+                    <para>
+                        Multiple files: an array, where each item is a string containing a single file name.
+                    </para>
+                </listitem>
+                <listitem>
+                    <para>
+                        No files: an empty array
+                    </para>
+                </listitem>
+            </itemizedlist>
+        </note>
 
         <para>
             Per default the file will automatically be received when you call