throws away the session cookie

@param  string $type one of the ::TYPE_* consts
if null, defaults to removing cookies for all possible types
@return void
164019
private static function destroy_cookie($type=null) {
	if (is_null($type)) {
		foreach (self::$type_durations as $type => $null) {
			self::destroy_cookie($type);
		}
		return;
	}
	
	if (self::cookie_exists($type) == false) {
		return;
	}
	
	self::update_cookie_expiration($type, $expire_now=true);
	
	$cookie_name = self::get_cookie_name($type);
	unset($_COOKIE[$cookie_name]);
}
1146598
public function clear($type = FALSE)
  {
    
	if ($type === FALSE){
		
		$this->_session_unset();
	}
	else {
		
		$messages = $this->_session_get();
		
		if (is_array($messages))
		{		
			foreach($messages as $i=>$message){
			
				if ($message->type == $type){
					
					unset($messages[$i]);
				}
			}
			
			if (!$this->count())
			{
				$this->clear();
			}
			else {
			
				$this->_session_set($messages);
			}
		}
	}
	
    return $this;
  }
1262081
protected function expireCookies ()
    {
        foreach ($this->_cookies as $key => $cookie) {
            if (isset($cookie['expires']) && $cookie['expires'] < time()) {
                unset($this->_cookies[$key]);
            }
        }
    }
297594
public function clearCache($type = null) {
		$config = $type ?: 'default';
		Cache::clear(false, $config);

		return true;
	}
456080
public function clear(string $type = null): FlashBag
    {
        if (is_null($type)) {
            $this->messages = [];
        } else {
            if (isset($this->messages[$type])) {
                unset($this->messages[$type]);
            }
        }

        // Save into session
        $this->saveToSession();

        return $this;
    }
1210336
protected function setRequestType(string $type):void
    {
        if ($type !== Protocol::REQUEST_TYPE_NOTIFY && $type !== Protocol::REQUEST_TYPE_FORWARD && $type !== protocol::REQUEST_TYPE_REGISTER) {
            throw new \TypeError("Unsupported request type: $type!");
        }

        $this->requestType = $type;
        $this->setHeader(Protocol::VERSION." ".$type);

    }
83187
public function expireSessionCookie(): void
    {
        if (ini_get('session.use_cookies')) {
            $params = session_get_cookie_params();
            setcookie(
                $this->getName(),
                '',
                $_SERVER['REQUEST_TIME'] - 42000,
                $params['path'],
                $params['domain'],
                $params['secure'],
                $params['httponly']
            );
        }
    }
1069672
public function unregisterCacheResource($type)
    {
        if (isset($this->smarty->registered_cache_resources[$type])) {
            unset($this->smarty->registered_cache_resources[$type]);
        }
    }
971687
public function delete($path, $_path='/') {
		if(!headers_sent())
			setcookie($path, null, -10000, $_path);
		unset($_COOKIE[$path]);
	}
803662
public function clearCookie($domain = '-', $path = null)
    {
        if ($domain === null) {
            $this->_cookies = [];
        } else {
            $domain = strtolower($domain);
            if ($path === null) {
                unset($this->_cookies[$domain]);
            } else {
                if (isset($this->_cookies[$domain])) {
                    unset($this->_cookies[$domain][$path]);
                }
            }
        }
    }
1374452
public function setType($type)
    {
        $const = sprintf('%s::TYPE_%s', __CLASS__, strtoupper($type));
        
        if(defined($const))
        {
            $type = constant($const);
        }
        
        $this->setAttributeDirectly('type', $type);
        
        $this->enumerationStrategy = null;
    }
1150950
public function clearSession(string $expiration = null): void
	{
		if ($expiration === null) {
			$expiration = $this->sessionExpiration;
		}
		foreach (Finder::findFiles('*')->date('<', '- ' . $expiration)
					 ->exclude('.htaccess', 'web.config')
					 ->in($this->sessionDir) as $file) {
			unlink((string) $file);
		}
	}
942009
function destroy(){
		$cookie_key=   Env::getConfig("jwt")->get('cookie_key');
		setcookie($cookie_key,'',time()-10000,'/');
		unset($_SESSION[$cookie_key]);
		session_destroy();
	}
894310
public function setType($type = '')
    {
        $this->type = empty($type) ? RouteType::NORMAL : $type;
        return true;
    }
161647
public function removeMapping($type)
    {
        $this->mappings->forget($type);
        $mappings = $this->getMappingsForClass($type);

        foreach ( $mappings as $key ) {
            $this->mappings->forget($key);
        }

        return $this;
    }
1095872
private static function get_cookie_name($type=null) {
	if (is_null($type)) {
		$type = $_SESSION['_session_type'];
	}
	
	return self::COOKIE_NAME_PREFIX.'-'.$type;
}
377457
public function destroy($sessionId)
    {
        parent::destroy($sessionId);
        if (isset($_COOKIE[$this->cookieKeyName])) {
            setcookie($this->cookieKeyName, '', 1);
            unset($_COOKIE[$this->cookieKeyName]);
        }
        return true;
    }