[ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 1108 lines (32 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Response:: (56 methods):
__construct()
create()
__toString()
__clone()
prepare()
sendHeaders()
sendContent()
send()
setContent()
getContent()
setProtocolVersion()
getProtocolVersion()
setStatusCode()
getStatusCode()
setCharset()
getCharset()
isCacheable()
isFresh()
isValidateable()
setPrivate()
setPublic()
mustRevalidate()
getDate()
setDate()
getAge()
expire()
getExpires()
setExpires()
getMaxAge()
setMaxAge()
setSharedMaxAge()
getTtl()
setTtl()
setClientTtl()
getLastModified()
setLastModified()
getEtag()
setEtag()
setCache()
setNotModified()
hasVary()
getVary()
setVary()
isNotModified()
isInvalid()
isInformational()
isSuccessful()
isRedirection()
isClientError()
isServerError()
isOk()
isForbidden()
isNotFound()
isRedirect()
isEmpty()
ensureIEOverSSLCompatibility()
__construct($content = '', $status = 200, $headers = array() X-Ref |
Constructor. param: string $content The response content param: int $status The response status code param: array $headers An array of response headers |
create($content = '', $status = 200, $headers = array() X-Ref |
Factory method for chainability. Example: return Response::create($body, 200) ->setSharedMaxAge(300); param: string $content The response content param: int $status The response status code param: array $headers An array of response headers return: Response |
__toString() X-Ref |
Returns the Response as an HTTP string. The string representation of the Response is the same as the one that will be sent to the client only if the prepare() method has been called before. return: string The Response as an HTTP string |
__clone() X-Ref |
Clones the current Response instance. |
prepare(Request $request) X-Ref |
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. param: Request $request A Request instance return: Response The current response. |
sendHeaders() X-Ref |
Sends HTTP headers. return: Response |
sendContent() X-Ref |
Sends content for the current web response. return: Response |
send() X-Ref |
Sends HTTP headers and content. return: Response |
setContent($content) X-Ref |
Sets the response content. Valid types are strings, numbers, and objects that implement a __toString() method. param: mixed $content return: Response |
getContent() X-Ref |
Gets the current response content. return: string Content |
setProtocolVersion($version) X-Ref |
Sets the HTTP protocol version (1.0 or 1.1). param: string $version The HTTP protocol version return: Response |
getProtocolVersion() X-Ref |
Gets the HTTP protocol version. return: string The HTTP protocol version |
setStatusCode($code, $text = null) X-Ref |
Sets the response status code. param: int $code HTTP status code param: mixed $text HTTP status text return: Response |
getStatusCode() X-Ref |
Retrieves the status code for the current web response. return: int Status code |
setCharset($charset) X-Ref |
Sets the response charset. param: string $charset Character set return: Response |
getCharset() X-Ref |
Retrieves the response charset. return: string Character set |
isCacheable() X-Ref |
Returns true if the response is worth caching under any circumstance. Responses marked "private" with an explicit Cache-Control directive are considered uncacheable. Responses with neither a freshness lifetime (Expires, max-age) nor cache validator (Last-Modified, ETag) are considered uncacheable. return: bool true if the response is worth caching, false otherwise |
isFresh() X-Ref |
Returns true if the response is "fresh". Fresh responses may be served from cache without any interaction with the origin. A response is considered fresh when it includes a Cache-Control/max-age indicator or Expires header and the calculated age is less than the freshness lifetime. return: bool true if the response is fresh, false otherwise |
isValidateable() X-Ref |
Returns true if the response includes headers that can be used to validate the response with the origin server using a conditional GET request. return: bool true if the response is validateable, false otherwise |
setPrivate() X-Ref |
Marks the response as "private". It makes the response ineligible for serving other clients. return: Response |
setPublic() X-Ref |
Marks the response as "public". It makes the response eligible for serving other clients. return: Response |
mustRevalidate() X-Ref |
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: bool true if the response must be revalidated by a cache, false otherwise |
getDate() X-Ref |
Returns the Date header as a DateTime instance. return: \DateTime A \DateTime instance |
setDate(\DateTime $date) X-Ref |
Sets the Date header. param: \DateTime $date A \DateTime instance return: Response |
getAge() X-Ref |
Returns the age of the response. return: int The age of the response in seconds |
expire() X-Ref |
Marks the response stale by setting the Age header to be equal to the maximum age of the response. return: Response |
getExpires() X-Ref |
Returns the value of the Expires header as a DateTime instance. return: \DateTime|null A DateTime instance or null if the header does not exist |
setExpires(\DateTime $date = null) X-Ref |
Sets the Expires HTTP header with a DateTime instance. Passing null as value will remove the header. param: \DateTime|null $date A \DateTime instance or null to remove the header return: Response |
getMaxAge() X-Ref |
Returns the number of seconds after the time specified in the response's Date header when the response should no longer be considered fresh. First, it checks for a s-maxage directive, then a max-age directive, and then it falls back on an expires header. It returns null when no maximum age can be established. return: int|null Number of seconds |
setMaxAge($value) X-Ref |
Sets the number of seconds after which the response should no longer be considered fresh. This methods sets the Cache-Control max-age directive. param: int $value Number of seconds return: Response |
setSharedMaxAge($value) X-Ref |
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. param: int $value Number of seconds return: Response |
getTtl() X-Ref |
Returns the response's time-to-live in seconds. It returns null when no freshness information is present in the response. When the responses TTL is <= 0, the response may not be served from cache without first revalidating with the origin. return: int|null The TTL in seconds |
setTtl($seconds) X-Ref |
Sets the response's time-to-live for shared caches. This method adjusts the Cache-Control/s-maxage directive. param: int $seconds Number of seconds return: Response |
setClientTtl($seconds) X-Ref |
Sets the response's time-to-live for private/client caches. This method adjusts the Cache-Control/max-age directive. param: int $seconds Number of seconds return: Response |
getLastModified() X-Ref |
Returns the Last-Modified HTTP header as a DateTime instance. return: \DateTime|null A DateTime instance or null if the header does not exist |
setLastModified(\DateTime $date = null) X-Ref |
Sets the Last-Modified HTTP header with a DateTime instance. Passing null as value will remove the header. param: \DateTime|null $date A \DateTime instance or null to remove the header return: Response |
getEtag() X-Ref |
Returns the literal value of the ETag HTTP header. return: string|null The ETag HTTP header or null if it does not exist |
setEtag($etag = null, $weak = false) X-Ref |
Sets the ETag value. param: string|null $etag The ETag unique identifier or null to remove the header param: bool $weak Whether you want a weak ETag or not return: Response |
setCache(array $options) X-Ref |
Sets the response's cache headers (validation and/or expiration). Available options are: etag, last_modified, max_age, s_maxage, private, and public. param: array $options An array of cache options return: Response |
setNotModified() X-Ref |
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: Response |
hasVary() X-Ref |
Returns true if the response includes a Vary header. return: bool true if the response includes a Vary header, false otherwise |
getVary() X-Ref |
Returns an array of header names given in the Vary header. return: array An array of Vary names |
setVary($headers, $replace = true) X-Ref |
Sets the Vary header. param: string|array $headers param: bool $replace Whether to replace the actual value or not (true by default) return: Response |
isNotModified(Request $request) X-Ref |
Determines if the Response validators (ETag, Last-Modified) match a conditional value specified in the Request. If the Response is not modified, it sets the status code to 304 and removes the actual content by calling the setNotModified() method. param: Request $request A Request instance return: bool true if the Response validators match the Request, false otherwise |
isInvalid() X-Ref |
Is response invalid? return: bool |
isInformational() X-Ref |
Is response informative? return: bool |
isSuccessful() X-Ref |
Is response successful? return: bool |
isRedirection() X-Ref |
Is the response a redirect? return: bool |
isClientError() X-Ref |
Is there a client error? return: bool |
isServerError() X-Ref |
Was there a server side error? return: bool |
isOk() X-Ref |
Is the response OK? return: bool |
isForbidden() X-Ref |
Is the response forbidden? return: bool |
isNotFound() X-Ref |
Is the response a not found error? return: bool |
isRedirect($location = null) X-Ref |
Is the response a redirect of some form? param: string $location return: bool |
isEmpty() X-Ref |
Is the response empty? return: bool |
ensureIEOverSSLCompatibility(Request $request) X-Ref |
Check if we need to remove Cache-Control for SSL encrypted downloads when using IE < 9. |
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |