public static function set($name, $value, $config = array())
    {
        // Use default config settings if needed
        extract(array_merge(static::$settings, $config));

        // If the cookie is being removed we want it left blank
        $value = $value ? base64_encode(Cipher::encrypt(json_encode($value), Config::config()->key)) : null;

        // Save cookie to user agent
        setcookie($name, $value, $expires, $path, $domain, $secure, $httponly);
    }
public static function set($name, $value, $config = array())
    {
        // Use default config settings if needed
        extract(array_merge(static::$settings, $config));

        // If the cookie is being removed we want it left blank
        $value = $value ? base64_encode(Cipher::encrypt(json_encode($value), Config::config()->key)) : null;

        // Save cookie to user agent
        setcookie($name, $value, $expires, $path, $domain, $secure, $httponly);
    }
public static function set ( $ name , $ value , $ config = array ( ) ) { // Use default config settings if needed extract ( array_merge ( static :: $ settings , $ config ) ) ; // If the cookie is being removed we want it left blank $ value = $ value ? base64_encode ( Cipher :: encrypt ( json_encode ( $ value ) , Config :: config ( ) -> key ) ) : null ; // Save cookie to user agent setcookie ( $ name , $ value , $ expires , $ path , $ domain , $ secure , $ httponly ) ; }
Called before any output is sent to create an encrypted cookie with the given value.

@param $name
@param mixed $value to save
@param array $config settings
return boolean
@internal param string $key cookie name
Called before any output is sent to create an encrypted cookie with the given value .