Returns the HTTP header value converted to a date.
/** * @expectedException \RuntimeException */ public function testGetDateException() { $bag = new HeaderBag(array('foo' => 'Tue')); $headerDate = $bag->getDate('foo'); }
/** * Returns the Last-Modified HTTP header as a DateTime instance. * * @return \DateTime A DateTime instance */ public function getLastModified() { return $this->headers->getDate('LastModified'); }