Neos\Flow\Http\Cookie::getMaximumAge PHP Метод

getMaximumAge() публичный Метод

This information is rendered as the Max-Age attribute (RFC 6265, 4.1.2.2). Note that not all browsers support this attribute.
public getMaximumAge ( ) : integer
Результат integer The maximum age in seconds, or NULL if none has been defined.
    public function getMaximumAge()
    {
        return $this->maximumAge;
    }

Usage Example

 /**
  * @test
  */
 public function getMaximumAgeReturnsTheMaximumAge()
 {
     $cookie = new Cookie('foo', 'bar');
     $this->assertSame(null, $cookie->getMaximumAge());
     $cookie = new Cookie('foo', 'bar', 0, 120);
     $this->assertSame(120, $cookie->getMaximumAge());
 }