maxAge

@param int $seconds

@return  static
482676
public function maxAge($seconds)
    {
        $this->response = $this->corsHandler->setResponse($this->response)
            ->maxAge($seconds)
            ->getResponse();

        return $this;
    }
269168
public static function create(int $hour, int $minute, int $second): Time
    {
        return new static($hour, $minute, $second);
    }
693239
public function cacheNoValidate($seconds = 60)
    {
        self::preventMultipleCaching();
        self::$cached = true;
        Header::cacheNoValidate($seconds);

        return $this;
    }
358119
public function setExpire(int $seconds): bool
    {
        return $this->handle->expire($this->name, $seconds);
    }
1113704
public static function cache($seconds, $modified = 0)
    {
        if ($seconds < 1) {
            self::putHeader('Expires', gmdate('D, d M Y H:i:s') . ' GMT');
            self::putHeader('Cache-Control', 'no-store, no-cache, must-revalidate');
            self::putHeader('Cache-Control', 'post-check=0, pre-check=0', false);
            self::putHeader('Pragma', 'no-cache');
        } else {
            self::putHeader('Expires', gmdate('D, d M Y H:i:s', REQUEST_TIME + $seconds) . ' GMT');
            self::putHeader('Cache-Control', 'public, max-age=' . $seconds);
            self::putHeader('Pragma', 'max-age=' . $seconds);
        }

        self::putHeader('Last-Modified', gmdate('D, d M Y H:i:s', $modified > 0 ? $modified : REQUEST_TIME) . ' GMT');
    }
909154
public static function fromSeconds($seconds)
    {
        $interval = new static('PT0S');

        foreach (array(
            'y' => self::SECONDS_YEAR,
            'm' => self::SECONDS_MONTH,
            'd' => self::SECONDS_DAY,
            'h' => self::SECONDS_HOUR,
            'i' => self::SECONDS_MINUTE
        ) as $property => $increment) {
            if (-1 !== bccomp($seconds, $increment)) {
                $count = floor(bcdiv($seconds, $increment, 1));

                $interval->$property = $count;

                $seconds = bcsub($seconds, bcmul($count, $increment));
            }
        }

        $interval->s = (int) $seconds;

        return $interval;
    }
95508
public function seconds($seconds) {

		if(false === ('-' . intval($seconds) == '-' . $seconds)) {
   			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($seconds)), E_USER_ERROR);
   		}

		$this -> seconds = $seconds;

		return $this;
	}
1353675
private function calculateCacheItemExpiresAfter($maxAge)
    {
        if (null === $this->config['cache_lifetime'] && null === $maxAge) {
            return;
        }

        return $this->config['cache_lifetime'] + $maxAge;
    }
618283
public function bySeconds(int $seconds): Date
    {
        return $this->secondTo($this->originalDate->seconds() + $seconds);
    }
744612
public function & SetExpirationSeconds ($seconds = 0) {
		/** @var $this \MvcCore\Session */
		if ($seconds > 0) 
			static::$meta->expirations[$this->__name] = static::$sessionStartTime + $seconds;
		return $this;
	}
161528
public function setDuration($seconds)
    {
        $seconds = round($seconds, 3);

        if ($seconds < 0 || $seconds > 999999.999) {
            throw new InvalidArgumentException('Duration seconds must be in range 0-999999.999');
        }

        $this->duration = $seconds;

        return $this;
    }
34785
public function forceCache($seconds = HOUR) {
		$response = $this->Controller->getResponse();

		$response = $response->withHeader('Cache-Control', 'public, max-age=' . $seconds)
			->withHeader('Last-modified', gmdate('D, j M Y H:i:s', time()) . ' GMT')
			->withHeader('Expires', gmdate('D, j M Y H:i:s', time() + $seconds) . ' GMT');

		$this->Controller->setResponse($response);
	}
811002
public static function formatSeconds($seconds)
    {
        $format = '';
        $rest = $seconds;
        if ($seconds >= 86400) {
            $format .= floor($seconds/86400).'d ';
            $rest = $seconds%86400;
        }

        if ($rest >= 3600) {
            $format .= floor($rest/3600).'h ';
            $rest = $rest%3600;
        }

        if ($rest >= 60) {
            $format .= floor($rest/60) . 'min ';
            $rest = $rest%60;
        }

        if ($rest > 0) {
            $format .= $rest . 'sec ';
        }

        return trim($format);
    }
1288942
public function remember($seconds = null, CacheInterface $cache = null)
	{
		if (is_null($cache))
		{
			// use the built in cache interface
			$cache = new Cache;
		}
		$this->cache    = $cache;
		$this->remember = $seconds;

		return $this;
	}
346600
public function setTimeout(float $seconds): self
    {
        $this->validateTimeout($seconds);
        $this->timeout = $seconds;

        return $this;
    }
1237362
public static function secondsToTime($seconds)
  {
    $dtF = new DateTime('@0');
    $dtT = new DateTime("@$seconds");
    $res = $dtF->diff($dtT);
    
    $days    = $res->format('%a');
    $hours   = $res->format('%h');
    $minutes = $res->format('%i');
    $seconds = $res->format('%s');
    
    $str = [];
    if ( intval($days) > 0 ){
      $str[] = $days.' '.($days===1?'day':'days');
    }
    if ( intval($hours) > 0 ){
      $str[] = $hours.' '.($hours===1?'hour':'hours');
    }
    if ( intval($minutes) > 0 ){
      $str[] = $minutes.' '.($minutes===1?'minute':'minutes');
    }
    if ( intval($seconds) > 0 ){
      $str[] = $seconds.' '.($seconds===1?'second':'seconds');
    }
    
    return implode(' ', $str);
  }
1105216
public function remember($seconds, $key = null)
    {
        list($this->cacheSeconds, $this->cacheKey) = [$seconds, $key];

        return $this;
    }