public function HeaderBag::contains

Returns true if the given HTTP header contains the given value.

@api

Parameters

string $key The HTTP header name:

string $value The HTTP value:

Return value

Boolean true if the value is contained in the header, false otherwise

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/HeaderBag.php, line 197

Class

HeaderBag
HeaderBag is a container for HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

public function contains($key, $value) {
  return in_array($value, $this
    ->get($key, null, false));
}