public function Client::addPostFields in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/fabpot/goutte/Goutte/Client.php \Goutte\Client::addPostFields()
1 call to Client::addPostFields()
- Client::doRequest in vendor/
fabpot/ goutte/ Goutte/ Client.php
File
- vendor/
fabpot/ goutte/ Goutte/ Client.php, line 186
Class
- Client
- Client.
Namespace
GoutteCode
public function addPostFields(array $formParams, array &$multipart, $arrayName = '') {
foreach ($formParams as $name => $value) {
if (!empty($arrayName)) {
$name = $arrayName . '[' . $name . ']';
}
if (is_array($value)) {
$this
->addPostFields($value, $multipart, $name);
}
else {
$multipart[] = [
'name' => $name,
'contents' => $value,
];
}
}
}