You are here

public function HeaderBag::contains in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/HeaderBag.php \Symfony\Component\HttpFoundation\HeaderBag::contains()

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

Parameters

string $key The HTTP header name:

string $value The HTTP value:

Return value

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

File

vendor/symfony/http-foundation/HeaderBag.php, line 175

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