You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The methods :method:`Symfony\\Component\\HttpFoundation\\Response::setExpires`, :method:`Symfony\\Component\\HttpFoundation\\Response::setLastModified` and :method:`Symfony\\Component\\HttpFoundation\\Response::setData` accepts an immutable date object.
403
+
.. note::
404
+
405
+
The methods :method:`Symfony\\Component\\HttpFoundation\\Response::setExpires`,
406
+
:method:`Symfony\\Component\\HttpFoundation\\Response::setLastModified` and
407
+
:method:`Symfony\\Component\\HttpFoundation\\Response::setDate` accept any
408
+
object that implements ``\DateTimeInterface``, including immutable date objects.
404
409
405
410
The :method:`Symfony\\Component\\HttpFoundation\\Response::setCache` method
406
411
can be used to set the most commonly used cache information in one method
407
412
call::
408
413
409
414
$response->setCache(array(
410
415
'etag' => 'abcdef',
411
-
'last_modified' => new \DateTime(), // Any object implementing \DateTimeInterface
0 commit comments