Bluz\Http\CacheControl::getLastModified PHP Method

getLastModified() public method

Returns the Last-Modified HTTP header as a string
public getLastModified ( ) : string
return string A string or null if the header does not exist
    public function getLastModified()
    {
        return $this->response->getHeader('Last-Modified');
    }

Usage Example

Esempio n. 1
0
 /**
  * Test Expires
  */
 public function testLastModifiedAsDate()
 {
     $date = new \DateTime('2012-12-12T12:12:12+00:00');
     $this->cacheControl->setLastModified($date);
     $this->assertEquals('Wed, 12 Dec 2012 12:12:12 GMT', $this->cacheControl->getLastModified());
     $this->assertEquals('Wed, 12 Dec 2012 12:12:12 GMT', $this->response->getHeader('Last-Modified'));
 }