Open Journal Systems  3.3.0
Symfony\Component\HttpFoundation\Response Class Reference
Inheritance diagram for Symfony\Component\HttpFoundation\Response:
Symfony\Component\HttpFoundation\BinaryFileResponse Symfony\Component\HttpFoundation\JsonResponse Symfony\Component\HttpFoundation\RedirectResponse Symfony\Component\HttpFoundation\StreamedResponse Symfony\Component\HttpFoundation\Tests\DefaultResponse Symfony\Component\HttpFoundation\Tests\ExtendedResponse

Public Member Functions

 __clone ()
 
 __clone ()
 
 __construct ($content='', $status=200, $headers=array())
 
 __construct ($content='', int $status=200, array $headers=[])
 
 __toString ()
 
 __toString ()
 
 expire ()
 
 expire ()
 
 getAge ()
 
 getAge ()
 
 getCharset ()
 
 getCharset ()
 
 getContent ()
 
 getContent ()
 
 getDate ()
 
 getDate ()
 
 getEtag ()
 
 getEtag ()
 
 getExpires ()
 
 getExpires ()
 
 getLastModified ()
 
 getLastModified ()
 
 getMaxAge ()
 
 getMaxAge ()
 
 getProtocolVersion ()
 
 getProtocolVersion ()
 
 getStatusCode ()
 
 getStatusCode ()
 
 getTtl ()
 
 getTtl ()
 
 getVary ()
 
 getVary ()
 
 hasVary ()
 
 hasVary ()
 
 isCacheable ()
 
 isCacheable ()
 
 isClientError ()
 
 isClientError ()
 
 isEmpty ()
 
 isEmpty ()
 
 isForbidden ()
 
 isForbidden ()
 
 isFresh ()
 
 isFresh ()
 
 isImmutable ()
 
 isInformational ()
 
 isInformational ()
 
 isInvalid ()
 
 isInvalid ()
 
 isNotFound ()
 
 isNotFound ()
 
 isNotModified (Request $request)
 
 isNotModified (Request $request)
 
 isOk ()
 
 isOk ()
 
 isRedirect ($location=null)
 
 isRedirect (string $location=null)
 
 isRedirection ()
 
 isRedirection ()
 
 isServerError ()
 
 isServerError ()
 
 isSuccessful ()
 
 isSuccessful ()
 
 isValidateable ()
 
 isValidateable ()
 
 mustRevalidate ()
 
 mustRevalidate ()
 
 prepare (Request $request)
 
 prepare (Request $request)
 
 send ()
 
 send ()
 
 sendContent ()
 
 sendContent ()
 
 sendHeaders ()
 
 sendHeaders ()
 
 setCache (array $options)
 
 setCache (array $options)
 
 setCharset ($charset)
 
 setCharset (string $charset)
 
 setClientTtl ($seconds)
 
 setClientTtl (int $seconds)
 
 setContent ($content)
 
 setContent ($content)
 
 setDate (\DateTime $date)
 
 setDate (\DateTimeInterface $date)
 
 setEtag ($etag=null, $weak=false)
 
 setEtag (string $etag=null, bool $weak=false)
 
 setExpires (\DateTime $date=null)
 
 setExpires (\DateTimeInterface $date=null)
 
 setImmutable (bool $immutable=true)
 
 setLastModified (\DateTime $date=null)
 
 setLastModified (\DateTimeInterface $date=null)
 
 setMaxAge ($value)
 
 setMaxAge (int $value)
 
 setNotModified ()
 
 setNotModified ()
 
 setPrivate ()
 
 setPrivate ()
 
 setProtocolVersion ($version)
 
 setProtocolVersion (string $version)
 
 setPublic ()
 
 setPublic ()
 
 setSharedMaxAge ($value)
 
 setSharedMaxAge (int $value)
 
 setStatusCode ($code, $text=null)
 
 setStatusCode (int $code, $text=null)
 
 setTtl ($seconds)
 
 setTtl (int $seconds)
 
 setVary ($headers, $replace=true)
 
 setVary ($headers, bool $replace=true)
 

Static Public Member Functions

static closeOutputBuffers ($targetLevel, $flush)
 
static closeOutputBuffers (int $targetLevel, bool $flush)
 
static create ($content='', $status=200, $headers=[])
 
static create ($content='', $status=200, $headers=array())
 

Data Fields

 $headers
 
const HTTP_ACCEPTED = 202
 
const HTTP_ALREADY_REPORTED = 208
 
const HTTP_BAD_GATEWAY = 502
 
const HTTP_BAD_REQUEST = 400
 
const HTTP_CONFLICT = 409
 
const HTTP_CONTINUE = 100
 
const HTTP_CREATED = 201
 
const HTTP_EARLY_HINTS = 103
 
const HTTP_EXPECTATION_FAILED = 417
 
const HTTP_FAILED_DEPENDENCY = 424
 
const HTTP_FORBIDDEN = 403
 
const HTTP_FOUND = 302
 
const HTTP_GATEWAY_TIMEOUT = 504
 
const HTTP_GONE = 410
 
const HTTP_I_AM_A_TEAPOT = 418
 
const HTTP_IM_USED = 226
 
const HTTP_INSUFFICIENT_STORAGE = 507
 
const HTTP_INTERNAL_SERVER_ERROR = 500
 
const HTTP_LENGTH_REQUIRED = 411
 
const HTTP_LOCKED = 423
 
const HTTP_LOOP_DETECTED = 508
 
const HTTP_METHOD_NOT_ALLOWED = 405
 
const HTTP_MISDIRECTED_REQUEST = 421
 
const HTTP_MOVED_PERMANENTLY = 301
 
const HTTP_MULTI_STATUS = 207
 
const HTTP_MULTIPLE_CHOICES = 300
 
const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511
 
const HTTP_NO_CONTENT = 204
 
const HTTP_NON_AUTHORITATIVE_INFORMATION = 203
 
const HTTP_NOT_ACCEPTABLE = 406
 
const HTTP_NOT_EXTENDED = 510
 
const HTTP_NOT_FOUND = 404
 
const HTTP_NOT_IMPLEMENTED = 501
 
const HTTP_NOT_MODIFIED = 304
 
const HTTP_OK = 200
 
const HTTP_PARTIAL_CONTENT = 206
 
const HTTP_PAYMENT_REQUIRED = 402
 
const HTTP_PERMANENTLY_REDIRECT = 308
 
const HTTP_PRECONDITION_FAILED = 412
 
const HTTP_PRECONDITION_REQUIRED = 428
 
const HTTP_PROCESSING = 102
 
const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407
 
const HTTP_REQUEST_ENTITY_TOO_LARGE = 413
 
const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431
 
const HTTP_REQUEST_TIMEOUT = 408
 
const HTTP_REQUEST_URI_TOO_LONG = 414
 
const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416
 
const HTTP_RESERVED = 306
 
const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425
 
const HTTP_RESET_CONTENT = 205
 
const HTTP_SEE_OTHER = 303
 
const HTTP_SERVICE_UNAVAILABLE = 503
 
const HTTP_SWITCHING_PROTOCOLS = 101
 
const HTTP_TEMPORARY_REDIRECT = 307
 
const HTTP_TOO_EARLY = 425
 
const HTTP_TOO_MANY_REQUESTS = 429
 
const HTTP_UNAUTHORIZED = 401
 
const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451
 
const HTTP_UNPROCESSABLE_ENTITY = 422
 
const HTTP_UNSUPPORTED_MEDIA_TYPE = 415
 
const HTTP_UPGRADE_REQUIRED = 426
 
const HTTP_USE_PROXY = 305
 
const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506
 
const HTTP_VERSION_NOT_SUPPORTED = 505
 

Static Public Attributes

static $statusTexts
 

Protected Member Functions

 ensureIEOverSSLCompatibility (Request $request)
 
 ensureIEOverSSLCompatibility (Request $request)
 

Protected Attributes

 $charset
 
 $content
 
 $statusCode
 
 $statusText
 
 $version
 

Detailed Description

Response represents an HTTP response.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 19 of file lib/vendor/symfony/http-foundation/Response.php.

Constructor & Destructor Documentation

◆ __construct() [1/2]

Symfony\Component\HttpFoundation\Response::__construct (   $content = '',
  $status = 200,
  $headers = array() 
)

◆ __construct() [2/2]

Member Function Documentation

◆ __clone() [1/2]

Symfony\Component\HttpFoundation\Response::__clone ( )

Clones the current Response instance.

Definition at line 269 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$headers.

◆ __clone() [2/2]

Symfony\Component\HttpFoundation\Response::__clone ( )

Clones the current Response instance.

Definition at line 270 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$headers.

◆ __toString() [1/2]

Symfony\Component\HttpFoundation\Response::__toString ( )

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.

Returns
string The Response as an HTTP string
See also
prepare()

Definition at line 258 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getContent().

◆ __toString() [2/2]

Symfony\Component\HttpFoundation\Response::__toString ( )

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.

Returns
string The Response as an HTTP string
See also
prepare()

Definition at line 259 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getContent().

◆ closeOutputBuffers() [1/2]

static Symfony\Component\HttpFoundation\Response::closeOutputBuffers (   $targetLevel,
  $flush 
)
static

Cleans or flushes output buffers up to target level.

Resulting level can be greater than target level if a non-removable buffer has been encountered.

Parameters
int$targetLevelThe target output buffering level
bool$flushWhether to flush or clean the buffers

@final since version 3.3

Definition at line 1275 of file lib/vendor/symfony/http-foundation/Response.php.

◆ closeOutputBuffers() [2/2]

static Symfony\Component\HttpFoundation\Response::closeOutputBuffers ( int  $targetLevel,
bool  $flush 
)
static

Cleans or flushes output buffers up to target level.

Resulting level can be greater than target level if a non-removable buffer has been encountered.

@final

Definition at line 1234 of file vendor/symfony/http-foundation/Response.php.

◆ create() [1/2]

static Symfony\Component\HttpFoundation\Response::create (   $content = '',
  $status = 200,
  $headers = [] 
)
static

Factory method for chainability.

Example:

return Response::create($body, 200)
    ->setSharedMaxAge(300);
Parameters
mixed$contentThe response content, see setContent()
int$statusThe response status code
array$headersAn array of response headers
Returns
static

Reimplemented in Symfony\Component\HttpFoundation\RedirectResponse, Symfony\Component\HttpFoundation\RedirectResponse, Symfony\Component\HttpFoundation\JsonResponse, Symfony\Component\HttpFoundation\JsonResponse, Symfony\Component\HttpFoundation\StreamedResponse, and Symfony\Component\HttpFoundation\StreamedResponse.

Definition at line 242 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$content, and Symfony\Component\HttpFoundation\Response\$headers.

◆ create() [2/2]

static Symfony\Component\HttpFoundation\Response::create (   $content = '',
  $status = 200,
  $headers = array() 
)
static

Factory method for chainability.

Example:

return Response::create($body, 200)
    ->setSharedMaxAge(300);
Parameters
mixed$contentThe response content, see setContent()
int$statusThe response status code
array$headersAn array of response headers
Returns
static

Reimplemented in Symfony\Component\HttpFoundation\RedirectResponse, Symfony\Component\HttpFoundation\RedirectResponse, Symfony\Component\HttpFoundation\JsonResponse, Symfony\Component\HttpFoundation\JsonResponse, Symfony\Component\HttpFoundation\StreamedResponse, and Symfony\Component\HttpFoundation\StreamedResponse.

Definition at line 243 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$content, and Symfony\Component\HttpFoundation\Response\$headers.

Referenced by Symfony\Component\HttpFoundation\Tests\ResponseTest\testCreate().

◆ ensureIEOverSSLCompatibility() [1/2]

Symfony\Component\HttpFoundation\Response::ensureIEOverSSLCompatibility ( Request  $request)
protected

Checks if we need to remove Cache-Control for SSL encrypted downloads when using IE < 9.

See also
http://support.microsoft.com/kb/323308

@final

Definition at line 1256 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Request\get(), and Symfony\Component\HttpFoundation\Request\isSecure().

◆ ensureIEOverSSLCompatibility() [2/2]

Symfony\Component\HttpFoundation\Response::ensureIEOverSSLCompatibility ( Request  $request)
protected

◆ expire() [1/2]

Symfony\Component\HttpFoundation\Response::expire ( )

Marks the response stale by setting the Age header to be equal to the maximum age of the response.

Returns
$this

Definition at line 718 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getMaxAge(), and Symfony\Component\HttpFoundation\Response\isFresh().

◆ expire() [2/2]

Symfony\Component\HttpFoundation\Response::expire ( )

Marks the response stale by setting the Age header to be equal to the maximum age of the response.

Returns
$this

Definition at line 719 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getMaxAge(), and Symfony\Component\HttpFoundation\Response\isFresh().

◆ getAge() [1/2]

Symfony\Component\HttpFoundation\Response::getAge ( )

Returns the age of the response in seconds.

@final

Definition at line 704 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getDate().

◆ getAge() [2/2]

Symfony\Component\HttpFoundation\Response::getAge ( )

Returns the age of the response.

Returns
int The age of the response in seconds

@final since version 3.2

Definition at line 705 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getDate().

Referenced by Symfony\Component\HttpFoundation\Response\getTtl(), Symfony\Component\HttpFoundation\Response\setClientTtl(), and Symfony\Component\HttpFoundation\Response\setTtl().

◆ getCharset() [1/2]

Symfony\Component\HttpFoundation\Response::getCharset ( )

Retrieves the response charset.

@final

Definition at line 531 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$charset.

◆ getCharset() [2/2]

Symfony\Component\HttpFoundation\Response::getCharset ( )

Retrieves the response charset.

Returns
string Character set

@final since version 3.2

Definition at line 547 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$charset.

◆ getContent() [1/2]

◆ getContent() [2/2]

◆ getDate() [1/2]

Symfony\Component\HttpFoundation\Response::getDate ( )

Returns the Date header as a DateTime instance.

Returns
\DateTime A \DateTime instance
Exceptions

Reimplemented in Symfony\Component\HttpFoundation\Tests\ExtendedResponse.

Definition at line 667 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\setDate().

Referenced by Symfony\Component\HttpFoundation\Response\getAge(), and Symfony\Component\HttpFoundation\Response\getMaxAge().

◆ getDate() [2/2]

Symfony\Component\HttpFoundation\Response::getDate ( )

Returns the Date header as a DateTime instance.

Exceptions

Reimplemented in Symfony\Component\HttpFoundation\Tests\ExtendedResponse.

Definition at line 675 of file vendor/symfony/http-foundation/Response.php.

◆ getEtag() [1/2]

Symfony\Component\HttpFoundation\Response::getEtag ( )

Returns the literal value of the ETag HTTP header.

@final

Definition at line 922 of file vendor/symfony/http-foundation/Response.php.

◆ getEtag() [2/2]

Symfony\Component\HttpFoundation\Response::getEtag ( )

Returns the literal value of the ETag HTTP header.

Returns
string|null The ETag HTTP header or null if it does not exist

@final since version 3.2

Definition at line 932 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\Response\isNotModified().

◆ getExpires() [1/2]

Symfony\Component\HttpFoundation\Response::getExpires ( )

Returns the value of the Expires header as a DateTime instance.

@final

Definition at line 733 of file vendor/symfony/http-foundation/Response.php.

◆ getExpires() [2/2]

Symfony\Component\HttpFoundation\Response::getExpires ( )

Returns the value of the Expires header as a DateTime instance.

Returns
\DateTime|null A DateTime instance or null if the header does not exist

@final since version 3.2

Definition at line 735 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\Response\getMaxAge().

◆ getLastModified() [1/2]

Symfony\Component\HttpFoundation\Response::getLastModified ( )

Returns the Last-Modified HTTP header as a DateTime instance.

Exceptions

Definition at line 885 of file vendor/symfony/http-foundation/Response.php.

◆ getLastModified() [2/2]

Symfony\Component\HttpFoundation\Response::getLastModified ( )

Returns the Last-Modified HTTP header as a DateTime instance.

Returns
\DateTime|null A DateTime instance or null if the header does not exist
Exceptions

Definition at line 896 of file lib/vendor/symfony/http-foundation/Response.php.

◆ getMaxAge() [1/2]

Symfony\Component\HttpFoundation\Response::getMaxAge ( )

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.

@final

Definition at line 779 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getDate(), and Symfony\Component\HttpFoundation\Response\getExpires().

◆ getMaxAge() [2/2]

Symfony\Component\HttpFoundation\Response::getMaxAge ( )

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.

Returns
int|null Number of seconds

@final since version 3.2

Definition at line 780 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getDate(), and Symfony\Component\HttpFoundation\Response\getExpires().

Referenced by Symfony\Component\HttpFoundation\Response\expire(), and Symfony\Component\HttpFoundation\Response\getTtl().

◆ getProtocolVersion() [1/2]

Symfony\Component\HttpFoundation\Response::getProtocolVersion ( )

Gets the HTTP protocol version.

@final

Definition at line 461 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$version.

◆ getProtocolVersion() [2/2]

Symfony\Component\HttpFoundation\Response::getProtocolVersion ( )

Gets the HTTP protocol version.

Returns
string The HTTP protocol version

@final since version 3.2

Definition at line 468 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$version.

Referenced by Symfony\Component\HttpFoundation\Response\prepare().

◆ getStatusCode() [1/2]

Symfony\Component\HttpFoundation\Response::getStatusCode ( )

Retrieves the status code for the current web response.

@final

Definition at line 507 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$statusCode.

◆ getStatusCode() [2/2]

Symfony\Component\HttpFoundation\Response::getStatusCode ( )

Retrieves the status code for the current web response.

Returns
int Status code

@final since version 3.2

Definition at line 519 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$statusCode.

◆ getTtl() [1/2]

Symfony\Component\HttpFoundation\Response::getTtl ( )

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.

@final

Definition at line 839 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getAge(), and Symfony\Component\HttpFoundation\Response\getMaxAge().

◆ getTtl() [2/2]

Symfony\Component\HttpFoundation\Response::getTtl ( )

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.

Returns
int|null The TTL in seconds

@final since version 3.2

Definition at line 844 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getAge(), and Symfony\Component\HttpFoundation\Response\getMaxAge().

Referenced by Symfony\Component\HttpFoundation\Response\isFresh().

◆ getVary() [1/2]

Symfony\Component\HttpFoundation\Response::getVary ( )

Returns an array of header names given in the Vary header.

@final

Definition at line 1048 of file vendor/symfony/http-foundation/Response.php.

◆ getVary() [2/2]

Symfony\Component\HttpFoundation\Response::getVary ( )

Returns an array of header names given in the Vary header.

Returns
array An array of Vary names

@final since version 3.2

Definition at line 1060 of file lib/vendor/symfony/http-foundation/Response.php.

◆ hasVary() [1/2]

Symfony\Component\HttpFoundation\Response::hasVary ( )

Returns true if the response includes a Vary header.

@final

Definition at line 1038 of file vendor/symfony/http-foundation/Response.php.

◆ hasVary() [2/2]

Symfony\Component\HttpFoundation\Response::hasVary ( )

Returns true if the response includes a Vary header.

Returns
bool true if the response includes a Vary header, false otherwise

@final since version 3.2

Definition at line 1048 of file lib/vendor/symfony/http-foundation/Response.php.

◆ isCacheable() [1/2]

Symfony\Component\HttpFoundation\Response::isCacheable ( )

Returns true if the response may safely be kept in a shared (surrogate) cache.

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 because there is no way to tell when or how to remove them from the cache.

Note that RFC 7231 and RFC 7234 possibly allow for a more permissive implementation, for example "status codes that are defined as cacheable by default [...] can be reused by a cache with heuristic expiration unless otherwise indicated" (https://tools.ietf.org/html/rfc7231#section-6.1)

@final

Definition at line 553 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\isFresh(), and Symfony\Component\HttpFoundation\Response\isValidateable().

◆ isCacheable() [2/2]

Symfony\Component\HttpFoundation\Response::isCacheable ( )

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.

Returns
bool true if the response is worth caching, false otherwise

@final since version 3.3

Definition at line 565 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\isFresh(), and Symfony\Component\HttpFoundation\Response\isValidateable().

◆ isClientError() [1/2]

Symfony\Component\HttpFoundation\Response::isClientError ( )

Is there a client error?

@final

Definition at line 1162 of file vendor/symfony/http-foundation/Response.php.

◆ isClientError() [2/2]

Symfony\Component\HttpFoundation\Response::isClientError ( )

Is there a client error?

Returns
bool

@final since version 3.2

Definition at line 1186 of file lib/vendor/symfony/http-foundation/Response.php.

◆ isEmpty() [1/2]

Symfony\Component\HttpFoundation\Response::isEmpty ( )

Is the response empty?

@final

Definition at line 1222 of file vendor/symfony/http-foundation/Response.php.

◆ isEmpty() [2/2]

Symfony\Component\HttpFoundation\Response::isEmpty ( )

Is the response empty?

Returns
bool

@final since version 3.2

Definition at line 1260 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\Response\prepare().

◆ isForbidden() [1/2]

Symfony\Component\HttpFoundation\Response::isForbidden ( )

Is the response forbidden?

@final

Definition at line 1192 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$statusCode.

◆ isForbidden() [2/2]

Symfony\Component\HttpFoundation\Response::isForbidden ( )

Is the response forbidden?

Returns
bool

@final since version 3.2

Definition at line 1222 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$statusCode.

◆ isFresh() [1/2]

Symfony\Component\HttpFoundation\Response::isFresh ( )

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.

@final

Definition at line 575 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getTtl().

◆ isFresh() [2/2]

Symfony\Component\HttpFoundation\Response::isFresh ( )

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.

Returns
bool true if the response is fresh, false otherwise

@final since version 3.3

Definition at line 589 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getTtl().

Referenced by Symfony\Component\HttpFoundation\Response\expire(), and Symfony\Component\HttpFoundation\Response\isCacheable().

◆ isImmutable()

Symfony\Component\HttpFoundation\Response::isImmutable ( )

Returns true if the response is marked as "immutable".

@final

Definition at line 648 of file vendor/symfony/http-foundation/Response.php.

◆ isInformational() [1/2]

Symfony\Component\HttpFoundation\Response::isInformational ( )

Is response informative?

@final

Definition at line 1132 of file vendor/symfony/http-foundation/Response.php.

◆ isInformational() [2/2]

Symfony\Component\HttpFoundation\Response::isInformational ( )

Is response informative?

Returns
bool

@final since version 3.3

Definition at line 1150 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\Response\prepare().

◆ isInvalid() [1/2]

Symfony\Component\HttpFoundation\Response::isInvalid ( )

Is response invalid?

See also
https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

@final

Definition at line 1122 of file vendor/symfony/http-foundation/Response.php.

◆ isInvalid() [2/2]

Symfony\Component\HttpFoundation\Response::isInvalid ( )

Is response invalid?

Returns
bool
See also
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

@final since version 3.2

Definition at line 1138 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\Response\setStatusCode().

◆ isNotFound() [1/2]

Symfony\Component\HttpFoundation\Response::isNotFound ( )

Is the response a not found error?

@final

Definition at line 1202 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$statusCode.

◆ isNotFound() [2/2]

Symfony\Component\HttpFoundation\Response::isNotFound ( )

Is the response a not found error?

Returns
bool

@final since version 3.2

Definition at line 1234 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$statusCode.

◆ isNotModified() [1/2]

Symfony\Component\HttpFoundation\Response::isNotModified ( Request  $request)

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.

Returns
bool true if the Response validators match the Request, false otherwise

@final

Definition at line 1090 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Request\get(), Symfony\Component\HttpFoundation\Response\getEtag(), Symfony\Component\HttpFoundation\Request\getETags(), Symfony\Component\HttpFoundation\Request\isMethodCacheable(), and Symfony\Component\HttpFoundation\Response\setNotModified().

◆ isNotModified() [2/2]

Symfony\Component\HttpFoundation\Response::isNotModified ( Request  $request)

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.

Parameters
Request$requestA Request instance
Returns
bool true if the Response validators match the Request, false otherwise

@final since version 3.3

Definition at line 1104 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Request\get(), Symfony\Component\HttpFoundation\Response\getEtag(), Symfony\Component\HttpFoundation\Request\getETags(), Symfony\Component\HttpFoundation\Request\isMethodCacheable(), and Symfony\Component\HttpFoundation\Response\setNotModified().

◆ isOk() [1/2]

Symfony\Component\HttpFoundation\Response::isOk ( )

Is the response OK?

@final

Definition at line 1182 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$statusCode.

◆ isOk() [2/2]

Symfony\Component\HttpFoundation\Response::isOk ( )

Is the response OK?

Returns
bool

@final since version 3.2

Definition at line 1210 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$statusCode.

◆ isRedirect() [1/2]

Symfony\Component\HttpFoundation\Response::isRedirect (   $location = null)

Is the response a redirect of some form?

Parameters
string$location
Returns
bool

@final since version 3.2

Definition at line 1248 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\RedirectResponse\__construct().

◆ isRedirect() [2/2]

Symfony\Component\HttpFoundation\Response::isRedirect ( string  $location = null)

Is the response a redirect of some form?

@final

Definition at line 1212 of file vendor/symfony/http-foundation/Response.php.

◆ isRedirection() [1/2]

Symfony\Component\HttpFoundation\Response::isRedirection ( )

Is the response a redirect?

@final

Definition at line 1152 of file vendor/symfony/http-foundation/Response.php.

◆ isRedirection() [2/2]

Symfony\Component\HttpFoundation\Response::isRedirection ( )

Is the response a redirect?

Returns
bool

@final since version 3.2

Definition at line 1174 of file lib/vendor/symfony/http-foundation/Response.php.

◆ isServerError() [1/2]

Symfony\Component\HttpFoundation\Response::isServerError ( )

Was there a server side error?

@final

Definition at line 1172 of file vendor/symfony/http-foundation/Response.php.

◆ isServerError() [2/2]

Symfony\Component\HttpFoundation\Response::isServerError ( )

Was there a server side error?

Returns
bool

@final since version 3.3

Definition at line 1198 of file lib/vendor/symfony/http-foundation/Response.php.

◆ isSuccessful() [1/2]

Symfony\Component\HttpFoundation\Response::isSuccessful ( )

Is response successful?

@final

Definition at line 1142 of file vendor/symfony/http-foundation/Response.php.

◆ isSuccessful() [2/2]

Symfony\Component\HttpFoundation\Response::isSuccessful ( )

Is response successful?

Returns
bool

@final since version 3.2

Definition at line 1162 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\BinaryFileResponse\sendContent().

◆ isValidateable() [1/2]

Symfony\Component\HttpFoundation\Response::isValidateable ( )

Returns true if the response includes headers that can be used to validate the response with the origin server using a conditional GET request.

@final

Definition at line 586 of file vendor/symfony/http-foundation/Response.php.

◆ isValidateable() [2/2]

Symfony\Component\HttpFoundation\Response::isValidateable ( )

Returns true if the response includes headers that can be used to validate the response with the origin server using a conditional GET request.

Returns
bool true if the response is validateable, false otherwise

@final since version 3.3

Definition at line 602 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\Response\isCacheable().

◆ mustRevalidate() [1/2]

Symfony\Component\HttpFoundation\Response::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.

Returns
bool true if the response must be revalidated by a cache, false otherwise

@final since version 3.3

Definition at line 653 of file lib/vendor/symfony/http-foundation/Response.php.

◆ mustRevalidate() [2/2]

Symfony\Component\HttpFoundation\Response::mustRevalidate ( )

Returns true if the response must be revalidated by shared caches once it has become stale.

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.

@final

Definition at line 663 of file vendor/symfony/http-foundation/Response.php.

◆ prepare() [1/2]

◆ prepare() [2/2]

◆ send() [1/2]

Symfony\Component\HttpFoundation\Response::send ( )

◆ send() [2/2]

Symfony\Component\HttpFoundation\Response::send ( )

◆ sendContent() [1/2]

◆ sendContent() [2/2]

◆ sendHeaders() [1/2]

Symfony\Component\HttpFoundation\Response::sendHeaders ( )

◆ sendHeaders() [2/2]

Symfony\Component\HttpFoundation\Response::sendHeaders ( )

◆ setCache() [1/2]

Symfony\Component\HttpFoundation\Response::setCache ( array  $options)

◆ setCache() [2/2]

Symfony\Component\HttpFoundation\Response::setCache ( array  $options)

Sets the response's cache headers (validation and/or expiration).

Available options are: etag, last_modified, max_age, s_maxage, private, and public.

Parameters
array$optionsAn array of cache options
Returns
$this
Exceptions

Definition at line 975 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\setEtag(), Symfony\Component\HttpFoundation\Response\setLastModified(), Symfony\Component\HttpFoundation\Response\setMaxAge(), Symfony\Component\HttpFoundation\Response\setPrivate(), Symfony\Component\HttpFoundation\Response\setPublic(), and Symfony\Component\HttpFoundation\Response\setSharedMaxAge().

◆ setCharset() [1/2]

Symfony\Component\HttpFoundation\Response::setCharset (   $charset)

Sets the response charset.

Parameters
string$charsetCharacter set
Returns
$this

@final since version 3.2

Definition at line 533 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$charset.

◆ setCharset() [2/2]

Symfony\Component\HttpFoundation\Response::setCharset ( string  $charset)

Sets the response charset.

Returns
$this

@final

Definition at line 519 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$charset.

◆ setClientTtl() [1/2]

Symfony\Component\HttpFoundation\Response::setClientTtl (   $seconds)

Sets the response's time-to-live for private/client caches.

This method adjusts the Cache-Control/max-age directive.

Parameters
int$secondsNumber of seconds
Returns
$this

@final since version 3.2

Definition at line 880 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getAge(), and Symfony\Component\HttpFoundation\Response\setMaxAge().

◆ setClientTtl() [2/2]

Symfony\Component\HttpFoundation\Response::setClientTtl ( int  $seconds)

Sets the response's time-to-live for private/client caches in seconds.

This method adjusts the Cache-Control/max-age directive.

Returns
$this

@final

Definition at line 871 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getAge(), and Symfony\Component\HttpFoundation\Response\setMaxAge().

◆ setContent() [1/2]

Symfony\Component\HttpFoundation\Response::setContent (   $content)

Sets the response content.

Valid types are strings, numbers, null, and objects that implement a __toString() method.

Parameters
mixed$contentContent that can be cast to string
Returns
$this
Exceptions

Reimplemented in Symfony\Component\HttpFoundation\BinaryFileResponse, Symfony\Component\HttpFoundation\BinaryFileResponse, Symfony\Component\HttpFoundation\StreamedResponse, and Symfony\Component\HttpFoundation\StreamedResponse.

Definition at line 421 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$content.

◆ setContent() [2/2]

◆ setDate() [1/2]

Symfony\Component\HttpFoundation\Response::setDate ( \DateTime  $date)

Sets the Date header.

Parameters
\DateTime$dateA \DateTime instance
Returns
$this

@final since version 3.2

Definition at line 690 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\Response\__construct(), Symfony\Component\HttpFoundation\Response\getDate(), and Symfony\Component\HttpFoundation\Response\sendHeaders().

◆ setDate() [2/2]

Symfony\Component\HttpFoundation\Response::setDate ( \DateTimeInterface  $date)

Sets the Date header.

Returns
$this

@final

Definition at line 687 of file vendor/symfony/http-foundation/Response.php.

◆ setEtag() [1/2]

Symfony\Component\HttpFoundation\Response::setEtag (   $etag = null,
  $weak = false 
)

Sets the ETag value.

Parameters
string | null$etagThe ETag unique identifier or null to remove the header
bool$weakWhether you want a weak ETag or not
Returns
$this

@final since version 3.2

Definition at line 947 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\BinaryFileResponse\setAutoEtag(), and Symfony\Component\HttpFoundation\Response\setCache().

◆ setEtag() [2/2]

Symfony\Component\HttpFoundation\Response::setEtag ( string  $etag = null,
bool  $weak = false 
)

Sets the ETag value.

Parameters
string | null$etagThe ETag unique identifier or null to remove the header
bool$weakWhether you want a weak ETag or not
Returns
$this

@final

Definition at line 937 of file vendor/symfony/http-foundation/Response.php.

◆ setExpires() [1/2]

Symfony\Component\HttpFoundation\Response::setExpires ( \DateTime  $date = null)

Sets the Expires HTTP header with a DateTime instance.

Passing null as value will remove the header.

Parameters
\DateTime | null$dateA \DateTime instance or null to remove the header
Returns
$this

@final since version 3.2

Definition at line 756 of file lib/vendor/symfony/http-foundation/Response.php.

◆ setExpires() [2/2]

Symfony\Component\HttpFoundation\Response::setExpires ( \DateTimeInterface  $date = null)

Sets the Expires HTTP header with a DateTime instance.

Passing null as value will remove the header.

Returns
$this

@final

Definition at line 752 of file vendor/symfony/http-foundation/Response.php.

◆ setImmutable()

Symfony\Component\HttpFoundation\Response::setImmutable ( bool  $immutable = true)

Marks the response as "immutable".

Returns
$this

@final

Definition at line 632 of file vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\Response\setCache().

◆ setLastModified() [1/2]

Symfony\Component\HttpFoundation\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 | null$dateA \DateTime instance or null to remove the header
Returns
$this

@final since version 3.2

Reimplemented in Symfony\Component\HttpFoundation\Tests\ExtendedResponse.

Definition at line 912 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\BinaryFileResponse\setAutoLastModified(), and Symfony\Component\HttpFoundation\Response\setCache().

◆ setLastModified() [2/2]

Symfony\Component\HttpFoundation\Response::setLastModified ( \DateTimeInterface  $date = null)

Sets the Last-Modified HTTP header with a DateTime instance.

Passing null as value will remove the header.

Returns
$this

@final

Definition at line 899 of file vendor/symfony/http-foundation/Response.php.

◆ setMaxAge() [1/2]

Symfony\Component\HttpFoundation\Response::setMaxAge (   $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$valueNumber of seconds
Returns
$this

@final since version 3.2

Definition at line 806 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\Response\setCache(), and Symfony\Component\HttpFoundation\Response\setClientTtl().

◆ setMaxAge() [2/2]

Symfony\Component\HttpFoundation\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.

Returns
$this

@final

Definition at line 805 of file vendor/symfony/http-foundation/Response.php.

◆ setNotModified() [1/2]

Symfony\Component\HttpFoundation\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.

Returns
$this
See also
https://tools.ietf.org/html/rfc2616#section-10.3.5

@final

Definition at line 1020 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\setContent(), and Symfony\Component\HttpFoundation\Response\setStatusCode().

◆ setNotModified() [2/2]

Symfony\Component\HttpFoundation\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.

Returns
$this
See also
http://tools.ietf.org/html/rfc2616#section-10.3.5

@final since version 3.3

Definition at line 1028 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\setContent(), and Symfony\Component\HttpFoundation\Response\setStatusCode().

Referenced by Symfony\Component\HttpFoundation\Response\isNotModified().

◆ setPrivate() [1/2]

Symfony\Component\HttpFoundation\Response::setPrivate ( )

Marks the response as "private".

It makes the response ineligible for serving other clients.

Returns
$this

@final

Definition at line 600 of file vendor/symfony/http-foundation/Response.php.

◆ setPrivate() [2/2]

Symfony\Component\HttpFoundation\Response::setPrivate ( )

Marks the response as "private".

It makes the response ineligible for serving other clients.

Returns
$this

@final since version 3.2

Definition at line 616 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\Response\setCache().

◆ setProtocolVersion() [1/2]

Symfony\Component\HttpFoundation\Response::setProtocolVersion (   $version)

Sets the HTTP protocol version (1.0 or 1.1).

Parameters
string$versionThe HTTP protocol version
Returns
$this

@final since version 3.2

Definition at line 454 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$version.

Referenced by Symfony\Component\HttpFoundation\Response\__construct(), Symfony\Component\HttpFoundation\BinaryFileResponse\prepare(), and Symfony\Component\HttpFoundation\Response\prepare().

◆ setProtocolVersion() [2/2]

Symfony\Component\HttpFoundation\Response::setProtocolVersion ( string  $version)

Sets the HTTP protocol version (1.0 or 1.1).

Returns
$this

@final

Definition at line 449 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$version.

◆ setPublic() [1/2]

Symfony\Component\HttpFoundation\Response::setPublic ( )

Marks the response as "public".

It makes the response eligible for serving other clients.

Returns
$this

@final

Definition at line 617 of file vendor/symfony/http-foundation/Response.php.

◆ setPublic() [2/2]

Symfony\Component\HttpFoundation\Response::setPublic ( )

Marks the response as "public".

It makes the response eligible for serving other clients.

Returns
$this

@final since version 3.2

Definition at line 633 of file lib/vendor/symfony/http-foundation/Response.php.

Referenced by Symfony\Component\HttpFoundation\BinaryFileResponse\__construct(), Symfony\Component\HttpFoundation\Response\setCache(), and Symfony\Component\HttpFoundation\Response\setSharedMaxAge().

◆ setSharedMaxAge() [1/2]

Symfony\Component\HttpFoundation\Response::setSharedMaxAge (   $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$valueNumber of seconds
Returns
$this

@final since version 3.2

Definition at line 824 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\setPublic().

Referenced by Symfony\Component\HttpFoundation\Response\setCache(), and Symfony\Component\HttpFoundation\Response\setTtl().

◆ setSharedMaxAge() [2/2]

Symfony\Component\HttpFoundation\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.

Returns
$this

@final

Definition at line 821 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\setPublic().

◆ setStatusCode() [1/2]

Symfony\Component\HttpFoundation\Response::setStatusCode (   $code,
  $text = null 
)

Sets the response status code.

Parameters
int$codeHTTP status code
mixed$textHTTP status text

If the status text is null it will be automatically populated for the known status codes and left empty otherwise.

Returns
$this
Exceptions

Definition at line 488 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\isInvalid().

Referenced by Symfony\Component\HttpFoundation\Response\__construct(), Symfony\Component\HttpFoundation\BinaryFileResponse\prepare(), and Symfony\Component\HttpFoundation\Response\setNotModified().

◆ setStatusCode() [2/2]

Symfony\Component\HttpFoundation\Response::setStatusCode ( int  $code,
  $text = null 
)

Sets the response status code.

If the status text is null it will be automatically populated for the known status codes and left empty otherwise.

Returns
$this
Exceptions

Definition at line 478 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\isInvalid().

◆ setTtl() [1/2]

Symfony\Component\HttpFoundation\Response::setTtl (   $seconds)

Sets the response's time-to-live for shared caches.

This method adjusts the Cache-Control/s-maxage directive.

Parameters
int$secondsNumber of seconds
Returns
$this

@final since version 3.2

Definition at line 862 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getAge(), and Symfony\Component\HttpFoundation\Response\setSharedMaxAge().

◆ setTtl() [2/2]

Symfony\Component\HttpFoundation\Response::setTtl ( int  $seconds)

Sets the response's time-to-live for shared caches in seconds.

This method adjusts the Cache-Control/s-maxage directive.

Returns
$this

@final

Definition at line 855 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\getAge(), and Symfony\Component\HttpFoundation\Response\setSharedMaxAge().

◆ setVary() [1/2]

Symfony\Component\HttpFoundation\Response::setVary (   $headers,
  $replace = true 
)

Sets the Vary header.

Parameters
string | array$headers
bool$replaceWhether to replace the actual value or not (true by default)
Returns
$this

@final since version 3.2

Definition at line 1084 of file lib/vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$headers.

◆ setVary() [2/2]

Symfony\Component\HttpFoundation\Response::setVary (   $headers,
bool  $replace = true 
)

Sets the Vary header.

Parameters
string | array$headers
bool$replaceWhether to replace the actual value or not (true by default)
Returns
$this

@final

Definition at line 1072 of file vendor/symfony/http-foundation/Response.php.

References Symfony\Component\HttpFoundation\Response\$headers.

Field Documentation

◆ $charset

◆ $content

◆ $headers

◆ $statusCode

◆ $statusText

string Symfony\Component\HttpFoundation\Response::$statusText
protected

◆ $statusTexts

static Symfony\Component\HttpFoundation\Response::$statusTexts
static

◆ $version

string Symfony\Component\HttpFoundation\Response::$version
protected

◆ HTTP_ACCEPTED

const Symfony\Component\HttpFoundation\Response::HTTP_ACCEPTED = 202

◆ HTTP_ALREADY_REPORTED

const Symfony\Component\HttpFoundation\Response::HTTP_ALREADY_REPORTED = 208

◆ HTTP_BAD_GATEWAY

const Symfony\Component\HttpFoundation\Response::HTTP_BAD_GATEWAY = 502

◆ HTTP_BAD_REQUEST

const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST = 400

◆ HTTP_CONFLICT

const Symfony\Component\HttpFoundation\Response::HTTP_CONFLICT = 409

◆ HTTP_CONTINUE

const Symfony\Component\HttpFoundation\Response::HTTP_CONTINUE = 100

◆ HTTP_CREATED

const Symfony\Component\HttpFoundation\Response::HTTP_CREATED = 201

◆ HTTP_EARLY_HINTS

const Symfony\Component\HttpFoundation\Response::HTTP_EARLY_HINTS = 103

Definition at line 27 of file vendor/symfony/http-foundation/Response.php.

◆ HTTP_EXPECTATION_FAILED

const Symfony\Component\HttpFoundation\Response::HTTP_EXPECTATION_FAILED = 417

◆ HTTP_FAILED_DEPENDENCY

const Symfony\Component\HttpFoundation\Response::HTTP_FAILED_DEPENDENCY = 424

◆ HTTP_FORBIDDEN

const Symfony\Component\HttpFoundation\Response::HTTP_FORBIDDEN = 403

◆ HTTP_FOUND

const Symfony\Component\HttpFoundation\Response::HTTP_FOUND = 302

◆ HTTP_GATEWAY_TIMEOUT

const Symfony\Component\HttpFoundation\Response::HTTP_GATEWAY_TIMEOUT = 504

◆ HTTP_GONE

const Symfony\Component\HttpFoundation\Response::HTTP_GONE = 410

◆ HTTP_I_AM_A_TEAPOT

const Symfony\Component\HttpFoundation\Response::HTTP_I_AM_A_TEAPOT = 418

◆ HTTP_IM_USED

const Symfony\Component\HttpFoundation\Response::HTTP_IM_USED = 226

◆ HTTP_INSUFFICIENT_STORAGE

const Symfony\Component\HttpFoundation\Response::HTTP_INSUFFICIENT_STORAGE = 507

◆ HTTP_INTERNAL_SERVER_ERROR

const Symfony\Component\HttpFoundation\Response::HTTP_INTERNAL_SERVER_ERROR = 500

◆ HTTP_LENGTH_REQUIRED

const Symfony\Component\HttpFoundation\Response::HTTP_LENGTH_REQUIRED = 411

◆ HTTP_LOCKED

const Symfony\Component\HttpFoundation\Response::HTTP_LOCKED = 423

◆ HTTP_LOOP_DETECTED

const Symfony\Component\HttpFoundation\Response::HTTP_LOOP_DETECTED = 508

◆ HTTP_METHOD_NOT_ALLOWED

const Symfony\Component\HttpFoundation\Response::HTTP_METHOD_NOT_ALLOWED = 405

◆ HTTP_MISDIRECTED_REQUEST

const Symfony\Component\HttpFoundation\Response::HTTP_MISDIRECTED_REQUEST = 421

◆ HTTP_MOVED_PERMANENTLY

const Symfony\Component\HttpFoundation\Response::HTTP_MOVED_PERMANENTLY = 301

◆ HTTP_MULTI_STATUS

const Symfony\Component\HttpFoundation\Response::HTTP_MULTI_STATUS = 207

◆ HTTP_MULTIPLE_CHOICES

const Symfony\Component\HttpFoundation\Response::HTTP_MULTIPLE_CHOICES = 300

◆ HTTP_NETWORK_AUTHENTICATION_REQUIRED

const Symfony\Component\HttpFoundation\Response::HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511

◆ HTTP_NO_CONTENT

const Symfony\Component\HttpFoundation\Response::HTTP_NO_CONTENT = 204

◆ HTTP_NON_AUTHORITATIVE_INFORMATION

const Symfony\Component\HttpFoundation\Response::HTTP_NON_AUTHORITATIVE_INFORMATION = 203

◆ HTTP_NOT_ACCEPTABLE

const Symfony\Component\HttpFoundation\Response::HTTP_NOT_ACCEPTABLE = 406

◆ HTTP_NOT_EXTENDED

const Symfony\Component\HttpFoundation\Response::HTTP_NOT_EXTENDED = 510

◆ HTTP_NOT_FOUND

const Symfony\Component\HttpFoundation\Response::HTTP_NOT_FOUND = 404

◆ HTTP_NOT_IMPLEMENTED

const Symfony\Component\HttpFoundation\Response::HTTP_NOT_IMPLEMENTED = 501

◆ HTTP_NOT_MODIFIED

const Symfony\Component\HttpFoundation\Response::HTTP_NOT_MODIFIED = 304

◆ HTTP_OK

const Symfony\Component\HttpFoundation\Response::HTTP_OK = 200

◆ HTTP_PARTIAL_CONTENT

const Symfony\Component\HttpFoundation\Response::HTTP_PARTIAL_CONTENT = 206

◆ HTTP_PAYMENT_REQUIRED

const Symfony\Component\HttpFoundation\Response::HTTP_PAYMENT_REQUIRED = 402

◆ HTTP_PERMANENTLY_REDIRECT

const Symfony\Component\HttpFoundation\Response::HTTP_PERMANENTLY_REDIRECT = 308

◆ HTTP_PRECONDITION_FAILED

const Symfony\Component\HttpFoundation\Response::HTTP_PRECONDITION_FAILED = 412

◆ HTTP_PRECONDITION_REQUIRED

const Symfony\Component\HttpFoundation\Response::HTTP_PRECONDITION_REQUIRED = 428

◆ HTTP_PROCESSING

const Symfony\Component\HttpFoundation\Response::HTTP_PROCESSING = 102

◆ HTTP_PROXY_AUTHENTICATION_REQUIRED

const Symfony\Component\HttpFoundation\Response::HTTP_PROXY_AUTHENTICATION_REQUIRED = 407

◆ HTTP_REQUEST_ENTITY_TOO_LARGE

const Symfony\Component\HttpFoundation\Response::HTTP_REQUEST_ENTITY_TOO_LARGE = 413

◆ HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE

const Symfony\Component\HttpFoundation\Response::HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431

◆ HTTP_REQUEST_TIMEOUT

const Symfony\Component\HttpFoundation\Response::HTTP_REQUEST_TIMEOUT = 408

◆ HTTP_REQUEST_URI_TOO_LONG

const Symfony\Component\HttpFoundation\Response::HTTP_REQUEST_URI_TOO_LONG = 414

◆ HTTP_REQUESTED_RANGE_NOT_SATISFIABLE

const Symfony\Component\HttpFoundation\Response::HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416

◆ HTTP_RESERVED

const Symfony\Component\HttpFoundation\Response::HTTP_RESERVED = 306

◆ HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL

const Symfony\Component\HttpFoundation\Response::HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425

◆ HTTP_RESET_CONTENT

const Symfony\Component\HttpFoundation\Response::HTTP_RESET_CONTENT = 205

◆ HTTP_SEE_OTHER

const Symfony\Component\HttpFoundation\Response::HTTP_SEE_OTHER = 303

◆ HTTP_SERVICE_UNAVAILABLE

const Symfony\Component\HttpFoundation\Response::HTTP_SERVICE_UNAVAILABLE = 503

◆ HTTP_SWITCHING_PROTOCOLS

const Symfony\Component\HttpFoundation\Response::HTTP_SWITCHING_PROTOCOLS = 101

◆ HTTP_TEMPORARY_REDIRECT

const Symfony\Component\HttpFoundation\Response::HTTP_TEMPORARY_REDIRECT = 307

◆ HTTP_TOO_EARLY

const Symfony\Component\HttpFoundation\Response::HTTP_TOO_EARLY = 425

Definition at line 75 of file vendor/symfony/http-foundation/Response.php.

◆ HTTP_TOO_MANY_REQUESTS

const Symfony\Component\HttpFoundation\Response::HTTP_TOO_MANY_REQUESTS = 429

◆ HTTP_UNAUTHORIZED

const Symfony\Component\HttpFoundation\Response::HTTP_UNAUTHORIZED = 401

◆ HTTP_UNAVAILABLE_FOR_LEGAL_REASONS

const Symfony\Component\HttpFoundation\Response::HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451

◆ HTTP_UNPROCESSABLE_ENTITY

const Symfony\Component\HttpFoundation\Response::HTTP_UNPROCESSABLE_ENTITY = 422

◆ HTTP_UNSUPPORTED_MEDIA_TYPE

const Symfony\Component\HttpFoundation\Response::HTTP_UNSUPPORTED_MEDIA_TYPE = 415

◆ HTTP_UPGRADE_REQUIRED

const Symfony\Component\HttpFoundation\Response::HTTP_UPGRADE_REQUIRED = 426

◆ HTTP_USE_PROXY

const Symfony\Component\HttpFoundation\Response::HTTP_USE_PROXY = 305

◆ HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL

const Symfony\Component\HttpFoundation\Response::HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506

◆ HTTP_VERSION_NOT_SUPPORTED

const Symfony\Component\HttpFoundation\Response::HTTP_VERSION_NOT_SUPPORTED = 505

The documentation for this class was generated from the following file: