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

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

Tells if this cookie is expired and will be removed in the user agent when it received the response containing this cookie.
public isExpired ( ) : boolean
Результат boolean True if this cookie is expired
    public function isExpired()
    {
        return $this->expiresTimestamp !== 0 && $this->expiresTimestamp < time();
    }

Usage Example

 /**
  * @test
  */
 public function isExpiredTellsIfTheCookieIsExpired()
 {
     $cookie = new Cookie('foo', 'bar');
     $this->assertFalse($cookie->isExpired());
     $cookie->expire();
     $this->assertTrue($cookie->isExpired());
     $cookie = new Cookie('foo', 'bar', 500);
     $this->assertTrue($cookie->isExpired());
 }