Response::setEtag()

Response setEtag(string|null $etag = null, bool $weak = false) Sets the ETag value. Parameters string|null $etag The ETag unique identifier or null to remove the header bool $weak Whether you want a weak ETag or not Return Value Response

Response::setDate()

Response setDate(DateTime $date) Sets the Date header. Parameters DateTime $date A \DateTime instance Return Value Response

Response::setContent()

Response setContent(mixed $content) Sets the response content. Valid types are strings, numbers, null, and objects that implement a __toString() method. Parameters mixed $content Content that can be cast to string Return Value Response Exceptions UnexpectedValueException

Response::setClientTtl()

Response setClientTtl(int $seconds) Sets the response's time-to-live for private/client caches. This method adjusts the Cache-Control/max-age directive. Parameters int $seconds Number of seconds Return Value Response

Response::setCharset()

Response setCharset(string $charset) Sets the response charset. Parameters string $charset Character set Return Value Response

Response::setCache()

Response setCache(array $options) Sets the response's cache headers (validation and/or expiration). Available options are: etag, lastmodified, maxage, s_maxage, private, and public. Parameters array $options An array of cache options Return Value Response Exceptions InvalidArgumentException

Response::sendHeaders()

Response sendHeaders() Sends HTTP headers. Return Value Response

Response::sendContent()

Response sendContent() Sends content for the current web response. Return Value Response

Response::send()

Response send() Sends HTTP headers and content. Return Value Response

Response::prepare()

Response prepare(Request $request) Prepares the Response before it is sent to the client. This method tweaks the Response to ensure that it is compliant with RFC 2616. Most of the changes are based on the Request that is "associated" with this Response. Parameters Request $request A Request instance Return Value Response The current response