@@ 685-696 (lines=12) @@ | ||
682 | * |
|
683 | * @return $this |
|
684 | */ |
|
685 | public function setExpires(\DateTime $date = null) |
|
686 | { |
|
687 | if (null === $date) { |
|
688 | $this->headers->remove('Expires'); |
|
689 | } else { |
|
690 | $date = clone $date; |
|
691 | $date->setTimezone(new \DateTimeZone('UTC')); |
|
692 | $this->headers->set('Expires', $date->format('D, d M Y H:i:s').' GMT'); |
|
693 | } |
|
694 | ||
695 | return $this; |
|
696 | } |
|
697 | ||
698 | /** |
|
699 | * Returns the number of seconds after the time specified in the response's Date |
|
@@ 825-836 (lines=12) @@ | ||
822 | * |
|
823 | * @return $this |
|
824 | */ |
|
825 | public function setLastModified(\DateTime $date = null) |
|
826 | { |
|
827 | if (null === $date) { |
|
828 | $this->headers->remove('Last-Modified'); |
|
829 | } else { |
|
830 | $date = clone $date; |
|
831 | $date->setTimezone(new \DateTimeZone('UTC')); |
|
832 | $this->headers->set('Last-Modified', $date->format('D, d M Y H:i:s').' GMT'); |
|
833 | } |
|
834 | ||
835 | return $this; |
|
836 | } |
|
837 | ||
838 | /** |
|
839 | * Returns the literal value of the ETag HTTP header. |