Sets the users account expiry date.

If no expiry time is given, the account is set to never expire.

@link https://msdn.microsoft.com/en-us/library/ms675098(v=vs.85).aspx

@param float $expiryTime

@return $this
347211
public function setAccountExpiry($expiryTime)
    {
        $time = is_null($expiryTime) ? '9223372036854775807' : (string) Utilities::convertUnixTimeToWindowsTime($expiryTime);

        return $this->setFirstAttribute($this->schema->accountExpires(), $time);
    }
323402
public function set($key, $value, $expiry = null)
	{
		// make sure we have a valid key
		if ($key === null)
		{
			throw new \RuntimeException('No valid key passed to set()');
		}

		// and store the value passed
		parent::set($this->prefixKey($key), $value);
	}
538591
public function set($key, $value, $expire = 0)
    {
        return $this->setItem($key, $value, time(), $expire);
    }
259490
public function set($key, $value, $expiration = 0)
    {
        $key = $this->createKey($key);
        $this->instance->set($key, $value, $expiration);
        return $this;
    }
424285
public function withExpires(DateTime $datetime)
    {
        $datetime->setTimezone(new DateTimeZone('UTC'));

        return $this->withHeader('Expires', $datetime->format('D, d M Y H:i:s') . ' GMT');
    }
566512
public function isExpired(DateTime $date = null)
    {
        // Here we'll determine if the account expires by checking is expiration date.
        if ($expirationDate = $this->expirationDate()) {
            $date = $date ?: new DateTime();

            return $expirationDate <= $date;
        }

        // The account has no expiry date.
        return false;
    }
766301
public function setExpire($expire)
	{
		if (null !== $expire)
		{
			$this->expire = $expire instanceof \DateTime ? $expire->getTimestamp() : (int) $expire;
		}
		else
		{
			$this->expire = $expire;
		}

		return $this;
	}
978956
public function setExpires($expires)
    {
        if (!$expires instanceof \DateTime) {
            // @see https://github.com/bshaffer/oauth2-server-bundle/issues/24
            $dateTime = new \DateTime();
            $dateTime->setTimestamp($expires);
            $expires = $dateTime;
        }

        $this->expires = $expires;

        return $this;
    }
1190644
public function expire($expire)
    {
        if (is_null($expire)) {
            $this->expire = null;
        } elseif (is_numeric($expire) || $expire instanceof DateInterval) {
            $this->expiresAfter($expire);
        } elseif ($expire instanceof DateTimeInterface) {
            $this->expire = $expire;
        } else {
            throw new InvalidArgumentException('not support datetime');
        }

        return $this;
    }
2621
public function withExpiry(\DateTimeInterface $date): self
    {
        $new = clone $this;

        if ($date instanceof \DateTimeImmutable) {
            $new->expiry = $date;
        } elseif ($date instanceof \DateTime) {
            $new->expiry = \DateTimeImmutable::createFromMutable($date);
        } else {
            $new->expiry = new \DateTimeImmutable("@" . $date->getTimestamp());
        }

        return $new;
    }
676638
public function expires($time)
    {
        if (!empty($time) && is_string($time) && !$timestamp = strtotime($time)) {
            throw new \Ergo\Routing\Exception("Invalid expiry time: $timestamp");
        } else if (is_numeric($time)) {
            $timestamp = $time;
        } else if ($time == false) {
            return $this;
        }

        $this->addHeader('Expires', date('r', $timestamp));

        return $this;
    }
245329
public function setExpiry(int $expiry = 604800) : CNabuDataObject
    {
        if ($expiry === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$expiry")
            );
        }
        $this->setValue('nb_domain_zone_expiry', $expiry);
        
        return $this;
    }
197428
public function set($entityId, $id, \DateTime $expiryTime) {
        $idEntry = $this->manager->find(IdEntity::class, ['entityId' => $entityId, 'id' => $id]);
        if (null == $idEntry) {
            $idEntry = new IdEntity();
        }
        $idEntry->setEntityId($entityId)
            ->setId($id)
            ->setExpiry($expiryTime);
        $this->manager->persist($idEntry);
        $this->manager->flush();
    }
1093319
public function setExpireTime(\DateTime $date)
    {
        $date->setTimezone(new \DateTimeZone('UTC'));
        $this->_claims['exp'] = (int)$date->format('U');

        return $this;
    }
1224471
public function expire($expire = 3600) {
        $this->cache_expire = intval($expire);
        defined('CACHE_EXPIRE') or define('CACHE_EXPIRE', $expire);

        return $this;
    }
1153876
public function setAsCache(DateTimeObject $expirationDate)
    {
        $expirationDateFormatted = date('D, d M Y H:i:s', $expirationDate->getTimestamp());

        $this->cacheControl->key('Expires', $expirationDateFormatted . ' GMT');

        $maxAge = $expirationDate->getTimestamp() - time();
        $this->cacheControl->key('Cache-Control', 'private, max-age=' . $maxAge);
        $this->cacheControl->key('Last-Modified', date('D, d M Y H:i:s') . ' GMT');

        return $this;
    }
727608
public function setExpirationInterval($expiration_interval)
    {
        $allowedValues = $this->getExpirationIntervalAllowableValues();
        if (!is_null($expiration_interval) && !in_array($expiration_interval, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'expiration_interval', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['expiration_interval'] = $expiration_interval;

        return $this;
    }