class ResponseHeaderBag extends HeaderBag
ResponseHeaderBag is a container for Response HTTP headers.
| COOKIES_FLAT | |
| COOKIES_ARRAY | |
| DISPOSITION_ATTACHMENT | |
| DISPOSITION_INLINE |
| __construct(array $headers = array()) Constructor. | ||
| string | __toString() Returns the headers as a string. | |
| array | all() Returns the headers. | from HeaderBag |
| array | keys() Returns the parameter keys. | from HeaderBag |
| replace(array $headers = array()) Replaces the current HTTP headers by a new set. | ||
| add(array $headers) Adds new headers the current HTTP headers set. | from HeaderBag | |
| string|array | get(string $key, mixed $default = null, bool $first = true) Returns a header value by name. | from HeaderBag |
| set(string $key, string|array $values, bool $replace = true) Sets a header by name. | ||
| bool | has(string $key) Returns true if the HTTP header is defined. | from HeaderBag |
| bool | contains(string $key, string $value) Returns true if the given HTTP header contains the given value. | from HeaderBag |
| remove(string $key) Removes a header. | ||
| null|DateTime | getDate(string $key, DateTime $default = null) Returns the HTTP header value converted to a date. | from HeaderBag |
| addCacheControlDirective(string $key, mixed $value = true) Adds a custom Cache-Control directive. | from HeaderBag | |
| bool | hasCacheControlDirective(string $key) Returns true if the Cache-Control directive is defined. | |
| mixed|null | getCacheControlDirective(string $key) Returns a Cache-Control directive value by name. | |
| removeCacheControlDirective(string $key) Removes a Cache-Control directive. | from HeaderBag | |
| ArrayIterator | getIterator() Returns an iterator for headers. | from HeaderBag |
| int | count() Returns the number of headers. | from HeaderBag |
| array | allPreserveCase() Returns the headers, with original capitalizations. | |
| setCookie(Cookie $cookie) Sets a cookie. | ||
| removeCookie(string $name, string $path = '/', string $domain = null) Removes a cookie from the array, but does not unset it in the browser. | ||
| array | getCookies(string $format = self::COOKIES_FLAT) Returns an array with all cookies. | |
| clearCookie(string $name, string $path = '/', string $domain = null, bool $secure = false, bool $httpOnly = true) Clears a cookie in the browser. | ||
| string | makeDisposition(string $disposition, string $filename, string $filenameFallback = '') Generates a HTTP Content-Disposition field-value. |
Constructor.
Returns the headers as a string.
Returns the headers.
Returns the parameter keys.
Replaces the current HTTP headers by a new set.
Adds new headers the current HTTP headers set.
Returns a header value by name.
Sets a header by name.
Returns true if the HTTP header is defined.
Returns true if the given HTTP header contains the given value.
Removes a header.
Returns the HTTP header value converted to a date.
Adds a custom Cache-Control directive.
Returns true if the Cache-Control directive is defined.
Returns a Cache-Control directive value by name.
Removes a Cache-Control directive.
Returns an iterator for headers.
Returns the number of headers.
Returns the headers, with original capitalizations.
Sets a cookie.
Removes a cookie from the array, but does not unset it in the browser.
Returns an array with all cookies.
Clears a cookie in the browser.
Generates a HTTP Content-Disposition field-value.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/HttpFoundation/ResponseHeaderBag.html