set cookie
@param string  $name
@param string  $value
@param int     $expire
@param string  $path
@param string  $domain
@param boolean $secure

@return void
763924
static public function setCookie($name, $value, $expire='3600', $path='', $domain='', $secure=false)
    {
        $prefix = $this->options['group'] ? $this->options['group'] . '_' : 'WS_';
        if ($name) $name =  $prefix . $name;
        HttpHelper::setCookie($name, $value, $expire, $path, $domain, $secure);
    }
1249236
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);
    }
1348750
protected function setCookie($value, $lifetime, $path = null, $domain = null, $secure = null, $httpOnly = null)
    {
        setcookie(
            $this->options['name'],
            json_encode($value),
            $lifetime,
            $path ?: $this->options['path'],
            $domain ?: $this->options['domain'],
            $secure ?: $this->options['secure'],
            $httpOnly ?: $this->options['http_only']
        );
    }
31310
public function cookie($name, $value, $expires = 0, $path = '', $domain = '', $secure = false, $httpOnly = false)
    {
        $cookie = new Cookie(
            $name,
            $value,
            $expires
        );

        return $cookie
            ->setPath($path)
            ->setDomain($domain)
            ->setIsSecure($secure)
            ->setIsHttpOnly($httpOnly)
            ->commit();
    }
218392
function setcookie($name, $value = null, $expire = null, $path = '/', $domain = null, $secure = null, $httponly = null)
    {
        if ($value == null)
        {
            $value = 'deleted';
        }
        $cookie = "$name=$value";
        if ($expire)
        {
            $cookie .= "; expires=" . date("D, d-M-Y H:i:s T", $expire);
        }
        if ($path)
        {
            $cookie .= "; path=$path";
        }
        if ($secure)
        {
            $cookie .= "; secure";
        }
        if ($domain)
        {
            $cookie .= "; domain=$domain";
        }
        if ($httponly)
        {
            $cookie .= '; httponly';
        }
        $this->cookie[] = $cookie;
    }
878808
public function create_cookie($name, $value, $expiration=NULL, $path=NULL, $domain=NULL) {
		
		$expTime = NULL;
		if(!is_null($expiration)) {
			if(is_numeric($expiration)) {
				$expTime = $expiration;
			}
			elseif(preg_match('/ /', $expiration)) {
				$expTime = strtotime($expiration);
			}
			else {
				throw new exception(__METHOD__ .": invalid timestamp given (". $expiration .")");
			}
		}
		
		if(is_null($domain)) {
			$bits = explode('.', $_SERVER['SERVER_NAME']);
			if(count($bits) > 1) {
				$tldBit = $bits[count($bits)-1];
				$domBit  = $bits[count($bits)];
				$domain = '.'. $domBit .'.'. $tldBit;
			}
		}
		
		$retval = setcookie($name, $value, $expTime, $path, $domain);
		return($retval);
		
	}
567816
public function setCookie($name, $value, $expires, $domain)
	{
		setcookie($name, $value, $expires, $domain);
		$_COOKIE[$name] = $value;
	}
560022
public function set($name, $value = null, $time = 2592000)
    {
        $value = json_encode($value);
        parent::set($name, $value);

        setcookie($name, $value, time() + $time, '/', $this->server->get('name'));
    }
335279
public function setCookie(
        $name,
        $value,
        $expires = null,
        $path = null,
        $domain = null,
        $secure = null,
        $httpOnly = null
    ) {
        $expires  = is_null($expires) ? $this->vitex->getConfig('cookies.lifetime') : $expires;
        $path     = is_null($path) ? $this->vitex->getConfig('cookies.path') : $path;
        $domain   = is_null($domain) ? $this->vitex->getConfig('cookies.domain') : $domain;
        $secure   = is_null($secure) ? $this->vitex->getConfig('cookies.secure') : $secure;
        $httpOnly = is_null($httpOnly) ? $this->vitex->getConfig('cookies.httponly') : $httpOnly;
        if (!is_numeric($expires)) {
            $expires = strtotime($expires);
        }
        $secret_key = $this->vitex->getConfig('cookies.secret_key');
        $encrypt    = $this->vitex->getConfig('cookies.encrypt');
        if ($encrypt) {
            $value = Utils::encrypt($value, $secret_key);
        }
        setcookie($name, $value, $expires, $path, $domain, $secure, $httpOnly);
    }
496559
public function set($name, $value, $expire = null) {
        if (is_null($expire)) {
            $expire = $this->options['expire'];
        }
        //if ($this->tag && !$this->has($name)) {
        //    $first = true;
        //}
        //$key = $this->getCacheKey($name);
        $expire = 0 == $expire ? 0 : $_SERVER['REQUEST_TIME'] + $expire;
        if ($this->handler->set($name, $value, $expire)) {
            //isset($first) && $this->setTagItem($name);
            return true;
        }
        return false;
    }
1123661
public function delete($name, $path = '/', $domain = '', $secure = false, $http_only = false) {
        $success = $this->set($name, null, -10, $path, $domain, $secure, $http_only);
        $this->_deleted_cookies[$name] = $name;

        if (isset($this->_cookies[$name])) {
            unset($this->_cookies[$name]);
        }

        return $success;
    }
642146
public void setCookie(String name, String value, String path, long maxAge, boolean secure, boolean httpOnly) {
        Date now = new Date();
        Date expirationDate = new Date(now.getTime() + maxAge);
        setCookie(name, value, path, expirationDate, secure, httpOnly);
    }
698864
public function set($name, $value, $expire = null): bool
    {
        $this->writeTimes++;

        if (is_null($expire)) {
            $expire = $this->options['expire'];
        }

        if (!empty($this->tag) && !$this->has($name)) {
            $first = true;
        }

        $key    = $this->getCacheKey($name);
        $expire = $this->getExpireTime($expire);

        $value = $this->serialize($value);

        if ($expire) {
            $this->handler->setex($key, $expire, $value);
        } else {
            $this->handler->set($key, $value);
        }

        isset($first) && $this->setTagItem($key);

        return true;
    }
1309702
public static function set(
        $name,
        $value,
        $expiry = 90,
        $path = null,
        $domain = null,
        $secure = false,
        $httpOnly = true
    ) {
        return self::get_inst()->set($name, $value, $expiry, $path, $domain, $secure, $httpOnly);
    }
460806
public function clearCookie($name, $path = '/', $domain = NULL, $secure = FALSE, $httpOnly = TRUE) {

        $this->setCookie(new Cookie($name, NULL, 1, $path, $domain, $secure, $httpOnly));

    }
928933
public function setCookie($value, $lifetime, $path = null, $domain = null, $secure = null, $httpOnly = null)
	{
		// Default parameters
		if ( ! isset($path))     $path     = $this->defaults['path'];
		if ( ! isset($domain))   $domain   = $this->defaults['domain'];
		if ( ! isset($secure))   $secure   = $this->defaults['secure'];
		if ( ! isset($httpOnly)) $httpOnly = $this->defaults['http_only'];

		setcookie($this->getKey(), json_encode($value), $lifetime, $path, $domain, $secure, $httpOnly);
	}
939581
public static function set($key, $value, $expire = null, $path = null, $domain = null, $secure = null, $httpOnly = null)
    {
        $result = setcookie($key, $value, $expire, $path, $domain, $secure, $httpOnly);
        return $result;
    }