Get the cookie value from the request, if defined.

@param name The name of the cookie
@return The cookie value, or null if the cookie was not found
337004
@Override
    public String cookieValue(String name) {
        return CookieHelper.getCookieValue(name, request().cookies());
    }
271521
protected static Cookie getCookie(HttpServletRequest request, String name) {

        Cookie[] cookies = request.getCookies();
        for (int i = 0; (cookies != null) && (i < cookies.length); i++) {
            if (name.equalsIgnoreCase(cookies[i].getName())) {
                return cookies[i];
            }
        }
        return new Cookie(name, "");
    }
133421
public static Cookie getCookie(final WebContext context, final String name) {
        return getCookie(context.getRequestCookies(), name);
    }
851391
public T get(final String name) {
        for (final T i : this) {
            if (i.getName().equals(name)) {
                return i;
            }
        }
        return null;
    }
273792
public function get($name)
    {
        $key = mb_strtolower($name);
        foreach ($this->cookies as $cookie) {
            if (mb_strtolower($cookie->getName()) === $key) {
                return $cookie;
            }
        }

        return null;
    }
86258
public String getCookie(String name, String dfvalue) {
        for (HttpCookie c : getCookies()) {
            if (name.equals(c.getName())) return c.getValue();
        }
        return dfvalue;
    }
356152
public static String extractCookie(final HttpServletRequest request, final String name) {
		for (Cookie cookie : request.getCookies()) {
			if (cookie.getName().equals(name)) {
				return cookie.getValue();
			}
		}
		return null;
	}
1203919
public void sendCookie(String name, String value) {
        RequestContext.getHttpResponse().addCookie(Cookie.toServletCookie(new Cookie(name, value)));
    }
974773
public static function GetAuthCookieValue ($name = self::DEFAULT_CONNECTION_NAME) {
		$options = static::GetAuthCookieOptions($name);

		$cookie_name_prefix	= $options['cookie_name_prefix'];
		$cookie_name_safix	= $options['cookie_name_safix'];

		$cookie_pattern	= sprintf("/^%s.+%s$/", $cookie_name_prefix, $cookie_name_safix);
		foreach (Request::GetCookies() as $name => $value) {
			if (preg_match($cookie_pattern, $name, $matches) !== 0) {
				return [$matches[0], $value];
			}
		}
		return null;
	}
1312286
public function getCookie($name) {
    $cookies = $this->browser->cookies();
    foreach ($cookies as $cookie) {
      if ($cookie instanceof Cookie && strcmp($cookie->getName(), $name) === 0) {
        return $cookie->getValue();
      }
    }
    return null;
  }
1018204
@Override
  public final String getCookieValue(final String pName) {
    if (this.httpReq.getCookies() == null) {
      return null;
    }
    for (Cookie co : this.httpReq.getCookies()) {
      if (co.getName().equals(pName)) {
        return co.getValue();
      }
    }
    return null;
  }
828115
public String getTokenValue(String tokenName) {
		Cookie ck = tokenValues.get(tokenName);
		if (ck != null) {
			return ck.getValue();
		}
		return null;
	}
347092
public void setCookie(final String name, final String value) {
		if (name != null) {
			Cookie cookie = new Cookie(name, value);
			cookies.put(name, cookie);
		}
	}
810736
public final static Cookie getCookie(HttpServletRequest httpServletRequest, String name) {
		final Map<String, Cookie> cookieMap = readCookieMap(httpServletRequest);
		return cookieMap == null ? null : cookieMap.get(name);
	}
757249
public static Cookie getCookie(HttpServletRequest request, String name) {
    Cookie[] cookies = request.getCookies();
    Cookie returnCookie = null;

    if (cookies == null) { return returnCookie; }
    for (int i = 0; i < cookies.length; i++) {
      Cookie thisCookie = cookies[i];
      if (thisCookie.getName().equals(name) && !thisCookie.getValue().equals("")) {
        returnCookie = thisCookie;
        break;
      }
    }
    return returnCookie;
  }
1346815
@SuppressWarnings("unchecked")
    private <A> A getRequestAttribute(String name) {

        Object attribute = m_request.getAttribute(name);

        return attribute != null ? (A)attribute : null;
    }
534637
public function getCookieData($name)
    {
        $this->buildCookieCollection();

        if (!$this->cookies->has($name)) {
            return null;
        }

        $cookie = $this->cookies->get($name);

        return $this->convertCookieToArray($cookie);
    }