Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a694401

Browse files
committed
[DomCrawler] Clarify the value returned by getPhpFiles()
The comment was previously suggesting the returned value is similar to the one stored in $_FILES, while it is more similar to the way PHP stores submitted form values. It is actually more convenient to have it this way, so rather then changing the returned value (which would break BC), it is better to clarify the comment.
1 parent 2799b1c commit a694401

File tree

1 file changed

+5
-1
lines changed
  • src/Symfony/Component/DomCrawler

1 file changed

+5
-1
lines changed

src/Symfony/Component/DomCrawler/Form.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,12 @@ public function getPhpValues()
157157
*
158158
* This method converts fields with the array notation
159159
* (like foo[bar] to arrays) like PHP does.
160+
* The returned array is consistent with the array for field values
161+
* (@see getPhpValues), rather than uploaded files found in $_FILES.
162+
* For a compound file field foo[bar] it will create foo[bar][name],
163+
* instead of foo[name][bar] which would be found in $_FILES.
160164
*
161-
* @return array An array of field values.
165+
* @return array An array of file field values.
162166
*/
163167
public function getPhpFiles()
164168
{

0 commit comments

Comments
 (0)