public function setExpiration($time, $variables = NULL)
{
$this->start();
if ($time) {
$time = Nette\Utils\DateTime::from($time)->format('U');
$max = (int) ini_get('session.gc_maxlifetime');
if ($max !== 0 && $time - time() > $max + 3) {
// 0 - unlimited in memcache handler, 3 - bulgarian constant
trigger_error("The expiration time is greater than the session expiration {$max} seconds");
}
}
foreach (is_array($variables) ? $variables : [$variables] as $variable) {
$this->meta[$variable]['T'] = $time ?: NULL;
}
return $this;
}