COOKIES_FLAT
COOKIES_FLAT = 'flat'
ResponseHeaderBag is a container for Response HTTP headers.
get(string $key, string|array<mixed,string>|null $default = null, boolean $first = true) : string|array<mixed,string>|null
Returns a header value by name.
string | $key | The header name |
string|array<mixed,string>|null | $default | The default value |
boolean | $first | Whether to return the first value or all header values |
The first header value or default value if $first is true, an array of values otherwise
getDate(string $key, \DateTime $default = null) : null|\DateTime
Returns the HTTP header value converted to a date.
string | $key | The parameter key |
\DateTime | $default | The default value |
When the HTTP header is not parseable
The parsed DateTime or the default value if the header does not exist
setCookie(\Symfony\Component\HttpFoundation\Cookie $cookie)
\Symfony\Component\HttpFoundation\Cookie | $cookie |
getCookies(string $format = self::COOKIES_FLAT) : array<mixed,\Symfony\Component\HttpFoundation\Cookie>
Returns an array with all cookies.
string | $format |
When the $format is invalid
makeDisposition(string $disposition, string $filename, string $filenameFallback = '') : string
Generates a HTTP Content-Disposition field-value.
string | $disposition | One of "inline" or "attachment" |
string | $filename | A unicode string |
string | $filenameFallback | A string containing only ASCII characters that is semantically equivalent to $filename. If the filename is already ASCII, it can be omitted, or just copied from $filename |
A string suitable for use as a Content-Disposition field-value