Response::setStatusCode()

Response setStatusCode(int $code, mixed $text = null) Sets the response status code. Parameters int $code HTTP status code mixed $text HTTP status text If the status text is null it will be automatically populated for the known status codes and left empty otherwise. Return Value Response Exceptions InvalidArgumentException When the HTTP status code is not valid

Response::setTtl()

Response setTtl(int $seconds) Sets the response's time-to-live for shared caches. This method adjusts the Cache-Control/s-maxage directive. Parameters int $seconds Number of seconds Return Value Response

Response::setProtocolVersion()

Response setProtocolVersion(string $version) Sets the HTTP protocol version (1.0 or 1.1). Parameters string $version The HTTP protocol version Return Value Response

Response::setPublic()

Response setPublic() Marks the response as "public". It makes the response eligible for serving other clients. Return Value Response

Response::setPrivate()

Response setPrivate() Marks the response as "private". It makes the response ineligible for serving other clients. Return Value Response

Response::setSharedMaxAge()

Response setSharedMaxAge(int $value) Sets the number of seconds after which the response should no longer be considered fresh by shared caches. This methods sets the Cache-Control s-maxage directive. Parameters int $value Number of seconds Return Value Response

Response::setLastModified()

Response setLastModified(DateTime $date = null) Sets the Last-Modified HTTP header with a DateTime instance. Passing null as value will remove the header. Parameters DateTime $date A \DateTime instance or null to remove the header Return Value Response

Response::setNotModified()

Response setNotModified() Modifies the response so that it conforms to the rules defined for a 304 status code. This sets the status, removes the body, and discards any headers that MUST NOT be included in 304 responses. Return Value Response See also http://tools.ietf.org/html/rfc2616#section-10.3.5

Response::setExpires()

Response setExpires(DateTime $date = null) Sets the Expires HTTP header with a DateTime instance. Passing null as value will remove the header. Parameters DateTime $date A \DateTime instance or null to remove the header Return Value Response

Response::setMaxAge()

Response setMaxAge(int $value) Sets the number of seconds after which the response should no longer be considered fresh. This methods sets the Cache-Control max-age directive. Parameters int $value Number of seconds Return Value Response