function HeaderBag::all
Returns the headers.
Parameters
string|null $key The name of the headers to return or null to get them all:
Return value
($key is null ? array<string, list<string|null>> : list<string|null>)
7 calls to HeaderBag::all()
- HeaderBag::contains in vendor/
symfony/ http-foundation/ HeaderBag.php - Returns true if the given HTTP header contains the given value.
- HeaderBag::get in vendor/
symfony/ http-foundation/ HeaderBag.php - Returns the first header by name or the default one.
- HeaderBag::has in vendor/
symfony/ http-foundation/ HeaderBag.php - Returns true if the HTTP header is defined.
- HeaderBag::keys in vendor/
symfony/ http-foundation/ HeaderBag.php - Returns the parameter keys.
- HeaderBag::__toString in vendor/
symfony/ http-foundation/ HeaderBag.php - Returns the headers as a string.
1 method overrides HeaderBag::all()
- ResponseHeaderBag::all in vendor/
symfony/ http-foundation/ ResponseHeaderBag.php - Returns the headers.
File
-
vendor/
symfony/ http-foundation/ HeaderBag.php, line 68
Class
- HeaderBag
- HeaderBag is a container for HTTP headers.
Namespace
Symfony\Component\HttpFoundationCode
public function all(?string $key = null) : array {
if (null !== $key) {
return $this->headers[strtr($key, self::UPPER, self::LOWER)] ?? [];
}
return $this->headers;
}