Discard an existing cookie

@param array $cookie An cookie

@return void

@access protected
433395
protected function discardCookie ($cookie)
    {
        if (!isset($cookie['domain'])
            || !isset($cookie['path'])
            || !isset($cookie['path'])
        ) {
            throw new CAS_InvalidArgumentException('Invalid Cookie array passed.');
        }

        foreach ($this->_cookies as $key => $old_cookie) {
            if ( $cookie['domain'] == $old_cookie['domain']
                && $cookie['path'] == $old_cookie['path']
                && $cookie['name'] == $old_cookie['name']
            ) {
                unset($this->_cookies[$key]);
            }
        }
    }
1049401
public function setCookies(array $cookies) : Request
    {
        $query = http_build_query($cookies);
        parse_str($query, $this->cookies);

        if ($cookies) {
            $cookie = str_replace('&', '; ', $query);
            $this->setHeader('Cookie', $cookie);
        } else {
            $this->removeHeader('Cookie');
        }

        return $this;
    }
1210853
function(name, cookie) {
    if (typeof cookie === 'undefined') {
      cookie = this.cookies[name]
    }
    var now = new Date()
    if (cookie && cookie.expires && now > cookie.expires) {
      delete this.cookies[name]
      return false
    }
    return true
  }
851357
private static function ang($cookie)
    {
        $data     = new \stdClass();
        $features = json_decode($cookie);

        var_dump($cookie, $features);exit;

        return $data;
    }
1307889
protected function decryptArray(array $cookie)
	{
		$decrypted = array();

		foreach ($cookie as $key => $value)
		{
			$decrypted[$key] = $this->encrypter->decrypt($value);
		}

		return $decrypted;
	}
1346021
public void deleteCookie(Cookie cookie) {
        cookies.remove(cookie.name());
        deletePersistedCookie(cookie.name());
    }
300583
public function cookie(array $cookie) {

        $cookies = '';

        foreach($cookie as $k => $v)

            $cookies .= $k . '=' . $v . ';';

        curl_setopt(self::$handle, CURLOPT_COOKIE, $cookies);

        return $this;
    }
389128
@Override
    public void removeCookie(HttpCookie cookie) {
        this.message.removeCookie(cookie.getName(), HttpHeaderKeys.HDR_SET_COOKIE);
    }
706631
public function forget()
	{
		$cookie = $this->jar->forget($this->getKey());
		$this->jar->queue($cookie);
	}
1159654
function UpdateCookies($cookies)
    {
        if (sizeof($this->cookies) == 0) {
            // no existing cookies: take whatever is new
            if (sizeof($cookies) > 0) {
                $this->debug('Setting new cookie(s)');
                $this->cookies = $cookies;
            }

            return TRUE;
        }
        if (sizeof($cookies) == 0) {
            // no new cookies: keep what we've got
            return TRUE;
        }
        // merge
        foreach ($cookies as $newCookie) {
            if (!is_array($newCookie)) {
                continue;
            }
            if ((!isset($newCookie['name'])) || (!isset($newCookie['value']))) {
                continue;
            }
            $newName = $newCookie['name'];

            $found = FALSE;
            for ($i = 0; $i < count($this->cookies); $i++) {
                $cookie = $this->cookies[$i];
                if (!is_array($cookie)) {
                    continue;
                }
                if (!isset($cookie['name'])) {
                    continue;
                }
                if ($newName != $cookie['name']) {
                    continue;
                }
                $newDomain = isset($newCookie['domain']) ? $newCookie['domain'] : 'NODOMAIN';
                $domain    = isset($cookie['domain']) ? $cookie['domain'] : 'NODOMAIN';
                if ($newDomain != $domain) {
                    continue;
                }
                $newPath = isset($newCookie['path']) ? $newCookie['path'] : 'NOPATH';
                $path    = isset($cookie['path']) ? $cookie['path'] : 'NOPATH';
                if ($newPath != $path) {
                    continue;
                }
                $this->cookies[$i] = $newCookie;
                $found             = TRUE;
                $this->debug('Update cookie ' . $newName . '=' . $newCookie['value']);
                break;
            }
            if (!$found) {
                $this->debug('Add cookie ' . $newName . '=' . $newCookie['value']);
                $this->cookies[] = $newCookie;
            }
        }

        return TRUE;
    }
67244
protected function decryptCookie($cookie)
	{
		return is_array($cookie)
						? $this->decryptArray($cookie)
						: $this->encrypter->decrypt($cookie);
	}
1099179
protected function isProtected(string $cookie): bool
    {
        if (in_array($cookie, $this->config->cookiesExcluded())) {
            //Excluded
            return false;
        }

        return $this->config->cookieProtectionMethod() != HttpConfig::COOKIE_UNPROTECTED;
    }
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']);
	}
31010
public function setCookie(ResponseCookie $cookie)
    {
        $this->cookies[$cookie->getName()] = $cookie;
        $this->setHeadersFromCookies();
    }
648939
private function rendeCookieString($cookie = '')
    {

        if ($cookie !== '') {

            $explode = explode(";", $cookie);
            $cookies = [];

            foreach ($explode as $ex) {

                $ex = explode('=', $ex, 2);
                $cookies[trim($ex[0])] = ($ex[1]);
            }

            return $cookies;
        }
    }
280954
public final function cookies(array $cookies = null): array
    {
        return ($cookies == null) ? $this->getCookies() : $this->getCookies($cookies);
    }
232916
public static function delete($name)
    {
        !isset(self::$init) && self::init();

        setcookie(
            $name, '', $_SERVER['REQUEST_TIME'] - 3600, self::$config['path'],
            self::$config['domain'], self::$config['secure']
        );

        unset($_COOKIE[$name]);
    }