Bluz\Http\CacheControl::setAge PHP Method

setAge() public method

Set the age of the response
public setAge ( integer $age ) : void
$age integer
return void
    public function setAge($age)
    {
        $this->response->setHeader('Age', $age);
    }

Usage Example

Esempio n. 1
0
 /**
  * Test Age
  */
 public function testAge()
 {
     $this->cacheControl->setAge(3600);
     $this->assertEquals(3600, $this->cacheControl->getAge());
     $this->assertEquals(3600, $this->response->getHeader('Age'));
 }