fuel/fuel/core/classes/cookie.php
public static function set($name, $value, $expiration = null, $path = null, $domain = null, $secure = null, $http_only = null)
	{
		// you can't set cookies in CLi mode
		if (\Fuel::$is_cli)
		{
			return false;
		}

		$value = \Fuel::value($value);

		// use the class defaults for the other parameters if not provided
		is_null($expiration) and $expiration = static::$config['expiration'];
		is_null($path) and $path = static::$config['path'];
		is_null($domain) and $domain = static::$config['domain'];
		is_null($secure) and $secure = static::$config['secure'];
		is_null($http_only) and $http_only = static::$config['http_only'];

		// add the current time so we have an offset
		$expiration = $expiration > 0 ? $expiration + time() : 0;

		return setcookie($name, $value, $expiration, $path, $domain, $secure, $http_only);
	}
public static function set($name, $value, $expiration = null, $path = null, $domain = null, $secure = null, $http_only = null)
	{
		// you can't set cookies in CLi mode
		if (\Fuel::$is_cli)
		{
			return false;
		}

		$value = \Fuel::value($value);

		// use the class defaults for the other parameters if not provided
		is_null($expiration) and $expiration = static::$config['expiration'];
		is_null($path) and $path = static::$config['path'];
		is_null($domain) and $domain = static::$config['domain'];
		is_null($secure) and $secure = static::$config['secure'];
		is_null($http_only) and $http_only = static::$config['http_only'];

		// add the current time so we have an offset
		$expiration = $expiration > 0 ? $expiration + time() : 0;

		return setcookie($name, $value, $expiration, $path, $domain, $secure, $http_only);
	}
public static function set ( $ name , $ value , $ expiration = null , $ path = null , $ domain = null , $ secure = null , $ http_only = null ) { // you can't set cookies in CLi mode if ( \ Fuel :: $ is_cli ) { return false ; } $ value = \ Fuel :: value ( $ value ) ; // use the class defaults for the other parameters if not provided is_null ( $ expiration ) and $ expiration = static :: $ config [ 'expiration' ] ; is_null ( $ path ) and $ path = static :: $ config [ 'path' ] ; is_null ( $ domain ) and $ domain = static :: $ config [ 'domain' ] ; is_null ( $ secure ) and $ secure = static :: $ config [ 'secure' ] ; is_null ( $ http_only ) and $ http_only = static :: $ config [ 'http_only' ] ; // add the current time so we have an offset $ expiration = $ expiration > 0 ? $ expiration + time ( ) : 0 ; return setcookie ( $ name , $ value , $ expiration , $ path , $ domain , $ secure , $ http_only ) ; }
Sets a signed cookie. Note that all cookie values must be strings and no
automatic serialization will be performed!

// Set the "theme" cookie
Cookie::set('theme', 'red');

@param   string    name of cookie
@param   string    value of cookie
@param   integer   lifetime in seconds
@param   string    path of the cookie
@param   string    domain of the cookie
@param   boolean   if true, the cookie should only be transmitted over a secure HTTPS connection
@param   boolean   if true, the cookie will be made accessible only through the HTTP protocol
@return  boolean
Sets a signed cookie . Note that all cookie values must be strings and no automatic serialization will be performed!