core-bundle/src/Resources/contao/library/Contao/Input.php
public static function setCookie($strKey, $varValue)
	{
		$strKey = static::cleanKey($strKey);

		unset(static::$arrCache['cookieEncoded'][$strKey]);
		unset(static::$arrCache['cookieDecoded'][$strKey]);

		if ($varValue === null)
		{
			unset($_COOKIE[$strKey]);
		}
		else
		{
			$_COOKIE[$strKey] = $varValue;
		}
	}
public static function setCookie($strKey, $varValue)
	{
		$strKey = static::cleanKey($strKey);

		unset(static::$arrCache['cookieEncoded'][$strKey]);
		unset(static::$arrCache['cookieDecoded'][$strKey]);

		if ($varValue === null)
		{
			unset($_COOKIE[$strKey]);
		}
		else
		{
			$_COOKIE[$strKey] = $varValue;
		}
	}
public static function setCookie ( $ strKey , $ varValue ) { $ strKey = static :: cleanKey ( $ strKey ) ; unset ( static :: $ arrCache [ 'cookieEncoded' ] [ $ strKey ] ) ; unset ( static :: $ arrCache [ 'cookieDecoded' ] [ $ strKey ] ) ; if ( $ varValue === null ) { unset ( $ _COOKIE [ $ strKey ] ) ; } else { $ _COOKIE [ $ strKey ] = $ varValue ; } }
Set a $_COOKIE variable

@param string $strKey   The variable name
@param mixed  $varValue The variable value
Set a $_COOKIE variable