setEtag() public method

Sets the ETag value
public setEtag ( string $etag, boolean $weak = false ) : void
$etag string The ETag unique identifier
$weak boolean Whether you want a weak ETag or not
return void
Example #1
0
 /**
  * Test Etag
  */
 public function testEtag()
 {
     $this->cacheControl->setEtag('"unique-content-id"');
     $this->assertEquals('"unique-content-id"', $this->cacheControl->getEtag());
     $this->assertEquals('"unique-content-id"', $this->response->getHeader('ETag'));
 }