src/session.php
private static function update_cookie_expiration($type, $expire_now=false) {
	$params = self::get_cookie_settings($type);
	$value  = session_id();
	$expire = (time() + $params['duration']);
	
	if ($expire_now) {
		$value  = null;
		$expire = (time() - 604800); // one week ago
	}
	
	setcookie($params['name'], $value, $expire, $params['path'], $params['domain'], $params['secure'], $params['http_only']);
}
private static function update_cookie_expiration($type, $expire_now=false) {
	$params = self::get_cookie_settings($type);
	$value  = session_id();
	$expire = (time() + $params['duration']);
	
	if ($expire_now) {
		$value  = null;
		$expire = (time() - 604800); // one week ago
	}
	
	setcookie($params['name'], $value, $expire, $params['path'], $params['domain'], $params['secure'], $params['http_only']);
}
private static function update_cookie_expiration ( $ type , $ expire_now = false ) { $ params = self :: get_cookie_settings ( $ type ) ; $ value = session_id ( ) ; $ expire = ( time ( ) + $ params [ 'duration' ] ) ; if ( $ expire_now ) { $ value = null ; $ expire = ( time ( ) - 604800 ) ; // one week ago } setcookie ( $ params [ 'name' ] , $ value , $ expire , $ params [ 'path' ] , $ params [ 'domain' ] , $ params [ 'secure' ] , $ params [ 'http_only' ] ) ; }
updates the cookies expiration with the type's duration
useful to keep the cookie active after each user activity

set $expire_now to true to remove the cookie

@param  string  $type       one of the ::TYPE_* consts
@param  boolean $expire_now default false
@return void
updates the cookies expiration with the type s duration useful to keep the cookie active after each user activity