Metaphore\Value::isStale PHP Метод

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

public isStale ( $nowTimestamp = null )
    public function isStale($nowTimestamp = null)
    {
        if (!$nowTimestamp) {
            $nowTimestamp = time();
        }
        return $nowTimestamp > $this->expirationTimestamp;
    }

Usage Example

Пример #1
0
 public function testUsesNowFunctionByDefaultForStaleCheck()
 {
     $result = 'garay2';
     $value = new Value($result, time() + 1);
     $this->assertFalse($value->isStale());
 }