Returns TRUE if the given HTTP header contains the given value.

@param string $key   The HTTP header name
@param string $value The HTTP value

@return Boolean TRUE if the value is contained in the header, FALSE otherwise
339738
public function contains($key, $value) {

		return in_array($value, $this->get($key, NULL, FALSE));

	}
393434
public function setHeader($key, $value)
    {
        $this->headers[$key] = $value;
        $headers = array();
        foreach ($this->headers as $key => $value) {
            $headers[] = $key . ': ' . $value;
        }
        $this->setOpt(CURLOPT_HTTPHEADER, $headers);
    }
199995
public function containsValue($value): bool {
        foreach ($this->array as $key => $val) {
            if (null === $val) {
                continue;
            }
            if (Comparator::equals($val, $value)) {
                return true;
            }
        }
        return false;
    }
433647
protected function setHeader($key, $value)
    {
        if (SERVER_MODE === 'swoole') {
            $GLOBALS['__$response']->header($key, $value);
        } else {
            if (!headers_sent()) {
                header($key . ': '. $value);
            }
        }
    }
978504
public function setHeader(string $key, string $value): void
    {
        $this->buildStructuredHeaders();
        $lkey = strtolower($key);
        if (isset($this->structuredHeaders[$lkey])) {
            $this->structuredHeaders[$lkey]['value'] = $value;
        } else {
            $newHeader = array('key' => $key, 'value' => $value);
            $this->structuredHeaders[$lkey] = $newHeader;
        }
        $this->storeStructuredHeader();
    }
1068588
protected function checkValidHeader($key, $value, &$error) {
    if (!is_string($key)) {
      $error = sprintf("Header key is not a string (Actual type: %s).",
                       gettype($key));
      return false;
    } else if (!in_array(strtolower($key), self::$allowed_headers)) {
      // Array keys don't have consistent case.
      $error = sprintf("Input header '%s: %s' is not whitelisted for use with" .
                       " the Google App Engine Mail Service.",
                       htmlspecialchars($key),
                       htmlspecialchars($value));
      return false;
    }
    return true;
  }
1001932
public function withHeader(string $key, $value): Headers
    {
        return new Headers(array_merge($this->headers, $this->filter([$key => $value])));
    }
1222616
public function containsKey($key): bool
    {
        return isset($this->items[$key]) || array_key_exists($key, $this->items);
    }
973573
public function setProperty($key, $value)
	{

		$content = $this->getJsonContents();

		if (count($content)) {
			if (isset($content[$key])) {
				unset($content[$key]);
			}

			$content[$key] = $value;

			$this->setJsonContents($content);

			return true;
		}

		return false;
	}
1223075
public function setHeaders($key, $value = null)
    {
        Argument::i()
            //argument 1 must be a string or array
            ->test(1, 'array', 'string')
            //argument 2 must be scalar or null
            ->test(2, 'scalar', 'null');

        if (is_array($key)) {
            $this->headers = $key;
            return $this;
        }

        $this->headers[] = $key.': '.$value;
        return $this;
    }
1105629
public function header($key, $value = null)
	{
		if( is_null($value) )
		{
			$pos = strpos($key, ":");
			if( ! $pos )
			{
				return $this;
			}

			$value = substr($key, $pos + 1);
			$key = substr($key, 0, $pos);
		}
		$this->headers->set($key, $value);
		return $this;
	}
1125605
public function setHeader($key, $value)
    {
        $this->headers[$key] = $value;

        //Headers can't be passed as key: value associative array
        $tmpHeaders = array();
        foreach($this->headers as $tmpKey => $tmpValue)
        {
            $tmpHeaders[] = "$tmpKey: $tmpValue";
        }

        curl_setopt($this->handle, CURLOPT_HTTPHEADER, $tmpHeaders);
    }
472605
public function includes ($value)
	{
		for ($i = 0; $i < $this->count(); $i++) {
			if ($value === $this->storage[$i]) {
				return true;
			}
		}

		return false;
	}
991550
public static function set(string $key, $value) : bool
    {
        $_SESSION[$key] = $value;

        return $_SESSION[$key] === $value;
    }
42160
public function contains($value)
    {
        if (is_array($this->value)) {
            /** @var Element $val */
            foreach ($this->value as $val) {
                if ($val->equals($value)) {
                    return true;
                }
            }

            return false;
        } else {
            return $this->equals($value);
        }
    }
336307
private static function isCustomer_header($key)
    {
        if ($key == 'Cache-Control' 
		|| $key == 'Content-Type' 
		|| $key == 'Content-Disposition' 
		|| $key == 'Content-Language'
		|| substr($key,0,strlen('x-cos-meta-')) == 'x-cos-meta-')
	    {
            return true;
	    }
	    return false;
    }
1273069
public function setHeader($key, $value = null, $preserveCase = false)
	{
		if ($value === null) {
			list($key, $value) = explode(':', $value, 2);
		}

		if (!$preserveCase) {
			$key = strtolower($key);
		}
		
		$key = trim($key);
		$this->headers[$key] = trim($value);

		return $this;
	}