Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Utils.php

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

Utils

Namespace

GuzzleHttp\Psr7

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal