You are here

public function HeaderBag::has in Zircon Profile 8.0

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

Returns true if the HTTP header is defined.

Parameters

string $key The HTTP header:

Return value

bool true if the parameter exists, false otherwise

1 call to HeaderBag::has()
ResponseHeaderBag::computeCacheControlValue in vendor/symfony/http-foundation/ResponseHeaderBag.php
Returns the calculated value of the cache-control header.

File

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

Class

HeaderBag
HeaderBag is a container for HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

public function has($key) {
  return array_key_exists(strtr(strtolower($key), '_', '-'), $this->headers);
}