ResponseListener

class ResponseListener implements EventSubscriberInterface Adds remember-me cookies to the Response. Methods onKernelResponse(FilterResponseEvent $event) static array getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. Details onKernelResponse(FilterResponseEvent $event) Parameters FilterResponseEvent $event static array getSubscribedEvents() Returns an array

ResponseListener

class ResponseListener implements EventSubscriberInterface ResponseListener fixes the Response headers based on the Request. Methods __construct($charset) onKernelResponse(FilterResponseEvent $event) Filters the Response. static array getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. Details __construct($charset) Parameters $charset onKernelResponse(FilterRespo

ResponseHeaderBag::setCookie()

setCookie(Cookie $cookie) Sets a cookie. Parameters Cookie $cookie

ResponseHeaderBag::replace()

replace(array $headers = array()) Replaces the current HTTP headers by a new set. Parameters array $headers An array of HTTP headers

ResponseHeaderBag::removeCookie()

removeCookie(string $name, string $path = '/', string $domain = null) Removes a cookie from the array, but does not unset it in the browser. Parameters string $name string $path string $domain

ResponseHeaderBag::remove()

remove(string $key) Removes a header. Parameters string $key The HTTP header name

ResponseHeaderBag::makeDisposition()

string makeDisposition(string $disposition, string $filename, string $filenameFallback = '') Generates a HTTP Content-Disposition field-value. Parameters 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 Return Value string A string suitable for use

ResponseHeaderBag::hasCacheControlDirective()

bool hasCacheControlDirective(string $key) Returns true if the Cache-Control directive is defined. Parameters string $key The Cache-Control directive Return Value bool true if the directive exists, false otherwise

ResponseHeaderBag::getCookies()

array getCookies(string $format = self::COOKIES_FLAT) Returns an array with all cookies. Parameters string $format Return Value array Exceptions InvalidArgumentException When the $format is invalid

ResponseHeaderBag::getCacheControlDirective()

mixed|null getCacheControlDirective(string $key) Returns a Cache-Control directive value by name. Parameters string $key The directive name Return Value mixed|null The directive value if defined, null otherwise