Sets a cookie on the browser, if null value then delete it
@param string $name
@param string $value
490693
public function setCookie($name, $value = null) {
    if ($value === null) {
      $this->browser->removeCookie($name);
    }
    //TODO: set the cookie with domain, not with url, meaning www.aaa.com or .aaa.com
    if ($value !== null) {
      $urlData = parse_url($this->getCurrentUrl());
      $cookie = array("name" => $name, "value" => $value, "domain" => $urlData["host"]);
      $this->browser->setCookie($cookie);
    }
  }
1357374
public function set($name, $value)
    {
        $name = $this->prefix . $name;
        return setcookie($name, $value, $this->expire, $this->path, $this->domain, $this->secure, $this->httpOnly);
    }
990197
public static function set($name, $value, $expiry)
    {
        if (setcookie($name, $value, time() + $expiry, '/', null, null, true)) {
            return true;
        }
        
        return false;
    }
1003167
public function setVariable(string $name, $value = null): void
    {
        [$name, $value] = $this->normaliseVariable($name, $value);

        $this->attributes[$name] = $value;

        if (!$this->setter || ($this->immutable && !is_null($this->getVariable($name)))) {
            return;
        }

        putenv("{$name}={$value}");
        $_ENV[$name] = $value;
        $_SERVER[$name] = $value;
    }
1033559
protected function setCookie(string $name, RequestCookieInterface $cookie): void
    {
        $this->cookies->set($name, $cookie);
    }
710722
public function setProperty($name, $value)
    {
        if (is_null($value)) {
            unset($this->_properties[$name]);
        } else {
            $this->_properties[$name] = $value;
        }
        return $this;
    }
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'));
    }
318165
public function set( $name, $value )
	{
		$name = trim( $name, '/' );

		if( $value !== null )
		{
			$this->_cache[ $name ] = $value;

			if( isset( $this->_negCache[ $name ] ) ) {
				unset( $this->_negCache[ $name ] );
			}
		}
		else
		{
			$this->_negCache[ $name ] = true;
		}

		$this->_getObject()->set( $name, $value );
	}
961341
public function set(string $name, $value): void
    {
        $this->loader->setVariable($name, $value);
    }
241448
public function setRequestCookie($request, $name, $value = null)
    {
        if (empty($name)) {
            return false;
        }

        $request = FigRequestCookies::set($request, Cookie::create($name, $value));

        return $request;
    }
1047118
public function setOption($name, $value = null)
    {
        if (is_array($name)) {
            $this->_option = $name;
        } elseif (is_null($value)) {
            unset($this->_option[$name]);
        } else {
            $this->_option[$name] = $value;
        }
    }
662373
public function setCookie(
        $name = "",
        $value = "",
        $expire = 0,
        $path = "/",
        $domain = "",
        $secure = false,
        $httpOnly = false
    ) {
        Cookies::$plugin->cookies->set(
            $name,
            $value,
            $expire,
            $path,
            $domain,
            $secure,
            $httpOnly
        );
    }
65148
protected function deleteCookie($name)
	{
		// Remove the cookie
		unset($_COOKIE[$name]);

		// Nullify the cookie and make it expire
		return setcookie($name, null, -86400, $this->config['cookie_path'], $this->config['cookie_domain'], $this->config['cookie_secure'], $this->config['cookie_http_only']);
	}
505290
public function set(string $name, $value): void
    {
        self::doInit();

        $_SESSION[$name] = $value;
    }
876664
public function setSecureCookie(
        $name = "",
        $value = "",
        $expire = 0,
        $path = "/",
        $domain = "",
        $secure = false,
        $httpOnly = false
    ) {
        Cookies::$plugin->cookies->setSecure(
            $name,
            $value,
            $expire,
            $path,
            $domain,
            $secure,
            $httpOnly
        );
    }
373497
public function setRequestHeader($name, $value) {
    $header = array();
    $header[$name] = $value;
    //TODO: as a limitation of the driver it self, we will send permanent for the moment
    $this->browser->addHeader($header, true);
  }
924323
public function set($name, $value) : void
    {
        $_SESSION[$name] = $value;

        parent::set($name, $value);
    }