function Utils::caselessRemove
Remove the items given by the keys, case insensitively from the data.
Parameters
(string|int)[] $keys:
1 call to Utils::caselessRemove()
- Utils::modifyRequest in vendor/
guzzlehttp/ psr7/ src/ Utils.php - Clone and modify a request with the given changes.
File
-
vendor/
guzzlehttp/ psr7/ src/ Utils.php, line 19
Class
Namespace
GuzzleHttp\Psr7Code
public static function caselessRemove(array $keys, array $data) : array {
$result = [];
foreach ($keys as &$key) {
$key = strtolower((string) $key);
}
foreach ($data as $k => $v) {
if (!in_array(strtolower((string) $k), $keys)) {
$result[$k] = $v;
}
}
return $result;
}