Checks if this cookie represents the same cookie as $cookie.

This does not compare the values, only name, domain and path.

@param Cookie $cookie

@return bool
161533
public function match(self $cookie)
    {
        return $this->name === $cookie->name && $this->domain === $cookie->domain and $this->path === $cookie->path;
    }
987262
public function addCookie(Cookie $cookie): Response
    {
        $this->cookies[$cookie->name()] = $cookie;
        return $this;
    }
1311818
public function loginByRememberMe(): bool {
		
		// build the cookie name
		$cookieName = static::getRememberMeCookieName();

		// check if cookie exists
		if (!isset($_COOKIE[$cookieName])) {
			return FALSE;
		}
			
		// try to unserialize the cookie content
		$content = unserialize($_COOKIE[$cookieName]);
		
		// cookie content is not unserializable
		if (FALSE === $content) {
			return FALSE;
		}

		// check if content exists and RememberMe length
		if (isset($content[0]) and isset($content[1]) and 32==strlen($content[1])) {
			
			// try to load user
			$user = static::getByRememberMe($content[1]);
			
			// if user exists, return it
			if (is_a($user, 'Pair\User')) {
				$user->createSession($content[0]);
				$user->renewRememberMe();
				return TRUE;
			}
		
		}
		
		return FALSE;
	
	}
851357
private static function ang($cookie)
    {
        $data     = new \stdClass();
        $features = json_decode($cookie);

        var_dump($cookie, $features);exit;

        return $data;
    }
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]);
            }
        }
    }
456596
public function get($cookie)
    {
        if (!$this->has($cookie)) {
            if ($this->getRequest()) {
                return $this->getRequest()->getCookie($cookie);
            }
            
            return null;
        }
        
        return $this->_cookies[$cookie]['value'];
    }
327860
private function encodeCookie(Cookie $cookie): Cookie
    {
        if ($this->config->cookieProtectionMethod() == HttpConfig::COOKIE_ENCRYPT) {
            $encrypter = $this->encryption->getEncrypter();

            return $cookie->withValue($encrypter->encrypt($cookie->getValue()));
        }

        //VALUE.HMAC
        return $cookie->withValue($cookie->getValue() . $this->hmacSign($cookie->getValue()));
    }
13934
public function addCookie(KHttpCookie $cookie)
    {
        $this->_cookies[$cookie->domain][(string) $cookie->path][$cookie->name] = $cookie;
    }
599481
public function cookieEquals($name, $value)
    {
        $this->cookieExists($name);

        $actualValue = $this->session->getCookie($name);
        $message = sprintf('Cookie "%s" value is "%s", but should be "%s".', $name, $actualValue, $value);

        $this->assert($actualValue == $value, $message);
    }
711448
protected function duplicate(Cookie $cookie, $value)
    {
        return new Cookie(
            $cookie->getName(), $value, $cookie->getExpiresTime(),
            $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(),
            $cookie->isHttpOnly(), $cookie->isRaw(), $cookie->getSameSite()
        );
    }
1185082
public function match($name)
    {
        $this->_options['value'] = isset($_COOKIE[$name]) ? $_COOKIE[$name] : null;
        if ($this->_options['value'] !== null) {
            $this->_options['name'] = $name;
            return true;
        }
        return false;
    }
500329
protected function decryptCookie($cookie)
    {
        if (is_array($cookie)) {
            return $this->decryptArray($cookie);
        } else {
            try {
                return $this->encrypter->decrypt(urldecode($cookie));
            } catch (Exception $e) {
                return $this->encrypter->decrypt($cookie);
            }
        }
    }
207042
private function encryptCookie($cookie)
    {
        $data = base64_encode(serialize($cookie));
        $enc = $this->kernel->getContainer()->get('encryption');
        return $enc->input($data)->key($this->kernel->getContainer()->getParameter('app_key'))->encrypt('enc_reversible_pkey')->output();
    }
948783
public function deleteCookie($cookieName) {
        if (isset($_COOKIE[$cookieName])) {
            if (setcookie($cookieName, null, time() - 6000, '/')) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
803499
private function isCandidateCookie($cookieName)
    {
        Types::assert(['string' => [$cookieName]]);

        if ($this->matchSubstring)
        {
            return $this->matchesSubstring($cookieName);
        }
        else
        {
            return $this->matchesFully($cookieName);
        }
    }
308653
public static function exists($name)
    {
        if (isset($_COOKIE[$name]) && !empty($_COOKIE[$name])) {
            return true;
        } else {
            return false;
        }
    }
318229
public function has($name)
    {
        if (isset($name) && !empty($name)) {
            if (isset($_COOKIE[$name])) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }