/** * Session will expire after given number of seconds of inactivity * * @param int $secs * @return Session * @throws SessionException */ public function setSessionLife(int $secs) : self { if ($secs <= 0) { throw SessionException::configError("sessionLife", "Expiry in seconds must be a positive integer"); } $this->config->sessionLife = $secs; return $this; }