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::setDate()

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

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::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::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::setCharset()

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

Response::sendContent()

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

Response::sendHeaders()

Response sendHeaders() Sends HTTP headers. Return Value Response

Response::send()

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

Response::mustRevalidate()

bool mustRevalidate() Returns true if the response must be revalidated by caches. This method indicates that the response must not be served stale by a cache in any circumstance without first revalidating with the origin. When present, the TTL of the response should not be overridden to be greater than the value provided by the origin. Return Value bool true if the response must be revalidated by a cache, false otherwise