메소드 |
설명 |
|
__clone ( ) |
Clones the current Response instance. |
|
__construct ( mixed $content = '', integer $status = 200, array $headers = [] ) |
Constructor. |
|
__toString ( ) : string |
Returns the Response as an HTTP string. |
|
closeOutputBuffers ( integer $targetLevel, boolean $flush ) |
Cleans or flushes output buffers up to target level. |
|
create ( mixed $content = '', integer $status = 200, array $headers = [] ) : Response |
Factory method for chainability. |
|
expire ( ) : Response |
Marks the response stale by setting the Age header to be equal to the maximum age of the response. |
|
getAge ( ) : integer |
Returns the age of the response. |
|
getCharset ( ) : string |
Retrieves the response charset. |
|
getContent ( ) : string |
Gets the current response content. |
|
getDate ( ) : DateTime |
Returns the Date header as a DateTime instance. |
|
getEtag ( ) : string | null |
Returns the literal value of the ETag HTTP header. |
|
getExpires ( ) : DateTime | null |
Returns the value of the Expires header as a DateTime instance. |
|
getLastModified ( ) : DateTime | null |
Returns the Last-Modified HTTP header as a DateTime instance. |
|
getMaxAge ( ) : integer | null |
Returns the number of seconds after the time specified in the response's Date
header when the response should no longer be considered fresh. |
|
getProtocolVersion ( ) : string |
Gets the HTTP protocol version. |
|
getStatusCode ( ) : integer |
Retrieves the status code for the current web response. |
|
getTtl ( ) : integer | null |
Returns the response's time-to-live in seconds. |
|
getVary ( ) : array |
Returns an array of header names given in the Vary header. |
|
hasVary ( ) : boolean |
Returns true if the response includes a Vary header. |
|
isCacheable ( ) : boolean |
Returns true if the response is worth caching under any circumstance. |
|
isClientError ( ) : boolean |
Is there a client error? |
|
isEmpty ( ) : boolean |
Is the response empty? |
|
isForbidden ( ) : boolean |
Is the response forbidden? |
|
isFresh ( ) : boolean |
Returns true if the response is "fresh". |
|
isInformational ( ) : boolean |
Is response informative? |
|
isInvalid ( ) : boolean |
Is response invalid? |
|
isNotFound ( ) : boolean |
Is the response a not found error? |
|
isNotModified ( Request $request ) : boolean |
Determines if the Response validators (ETag, Last-Modified) match
a conditional value specified in the Request. |
|
isOk ( ) : boolean |
Is the response OK? |
|
isRedirect ( string $location = null ) : boolean |
Is the response a redirect of some form? |
|
isRedirection ( ) : boolean |
Is the response a redirect? |
|
isServerError ( ) : boolean |
Was there a server side error? |
|
isSuccessful ( ) : boolean |
Is response successful? |
|
isValidateable ( ) : boolean |
Returns true if the response includes headers that can be used to validate
the response with the origin server using a conditional GET request. |
|
mustRevalidate ( ) : boolean |
Returns true if the response must be revalidated by caches. |
|
prepare ( Request $request ) : Response |
Prepares the Response before it is sent to the client. |
|
send ( ) : Response |
Sends HTTP headers and content. |
|
sendContent ( ) : Response |
Sends content for the current web response. |
|
sendHeaders ( ) : Response |
Sends HTTP headers. |
|
setCache ( array $options ) : Response |
Sets the response's cache headers (validation and/or expiration). |
|
setCharset ( string $charset ) : Response |
Sets the response charset. |
|
setClientTtl ( integer $seconds ) : Response |
Sets the response's time-to-live for private/client caches. |
|
setContent ( mixed $content ) : Response |
Sets the response content. |
|
setDate ( DateTime $date ) : Response |
Sets the Date header. |
|
setEtag ( string | null $etag = null, boolean $weak = false ) : Response |
Sets the ETag value. |
|
setExpires ( DateTime $date = null ) : Response |
Sets the Expires HTTP header with a DateTime instance. |
|
setLastModified ( DateTime $date = null ) : Response |
Sets the Last-Modified HTTP header with a DateTime instance. |
|
setMaxAge ( integer $value ) : Response |
Sets the number of seconds after which the response should no longer be considered fresh. |
|
setNotModified ( ) : Response |
Modifies the response so that it conforms to the rules defined for a 304 status code. |
|
setPrivate ( ) : Response |
Marks the response as "private". |
|
setProtocolVersion ( string $version ) : Response |
Sets the HTTP protocol version (1.0 or 1.1). |
|
setPublic ( ) : Response |
Marks the response as "public". |
|
setSharedMaxAge ( integer $value ) : Response |
Sets the number of seconds after which the response should no longer be considered fresh by shared caches. |
|
setStatusCode ( integer $code, mixed $text = null ) : Response |
Sets the response status code. |
|
setTtl ( integer $seconds ) : Response |
Sets the response's time-to-live for shared caches. |
|
setVary ( string | array $headers, boolean $replace = true ) : Response |
Sets the Vary header. |
|