Read a single cookie from the response.

This method provides read access to pending cookies. It will
not read the `Set-Cookie` header if set.

@param string $name The cookie name you want to read.
@return array|null Either the cookie data or null
771815
public function getCookie($name)
    {
        if (!$this->_cookies->has($name)) {
            return null;
        }

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

        return $this->convertCookieToArray($cookie);
    }
528355
public function get($name) {
         $this->open();
         $name  =   $this->options['prefix'].$name;
         $s     =   'F' . pack('N', strlen($name)) . $name;
         fwrite($this->handler, $s);

         for ($data = ''; !feof($this->handler);) {
             $data .= fread($this->handler, 4096);
         }
        N('cache_read',1);
         $this->close();
         return $data === '' ? '' : unserialize($data);
     }
223688
public function getResult($name=NULL) {
		if($name === NULL) {
				# An array is always copied
			return $this->response_result;
		}

		if(is_array($this->response_result) && isset($this->response_result[$name])) {
			return $this->response_result[$name];
		}

		return NULL;
	}
1094707
public function read(Request $request)
    {
        if (!$request->cookies->has($this->cookieSettings->getName())) {
            return null;
        }

        return $this->createCookieWithValue(
            $request->cookies->get($this->cookieSettings->getName())
        );
    }
1122735
function(name) {
    var c = document.cookie.split(';');
    
    for (var i = 0, cookie; i < c.length; i++) {
      cookie = c[i].split('=');
      if (cookie[0].strip() === name)
        return cookie[1].strip();
    }
    
    return null;
  }
990680
public function getRaw(string $name): array
    {
        if (strtolower($name) === 'cache-control') {
            return $this->getCacheControlDirectives();
        }

        if (strtolower($name) === 'set-cookie') {
            $cookies = $this->fields['Set-Cookie'] ?? [];
            foreach ($this->cookies as $cookie) {
                $cookies[] = (string)$cookie;
            }

            return $cookies;
        }
        if (!isset($this->fields[$name])) {
            return [];
        }

        return $this->fields[$name];
    }
826968
public function cookie(string $name): string {
        if (!isset($this->cookies[$name])) {
            return "";
        }
        return $this->cookies[$name];
    }
554097
public function getCookie($name = null)
    {
        $cookie  = $_COOKIE;
        $encrypt = $this->vitex->getConfig('cookies.encrypt');
        if ($encrypt) {
            $secret_key = $this->vitex->getConfig('cookies.secret_key');
            foreach ($cookie as &$c) {
                try {
                    $c = Utils::decrypt($c, $secret_key);
                } catch(Exception $e){}
            }
        }
        if ($name === null) {
            return $cookie;
        }
        return isset($cookie[$name]) ? $cookie[$name] : '';
    }
668039
static public function getCookie($name=null)
    {
        $prefix = $this->options['group'] ? $this->options['group'] . '_' : 'WS_';
        if ($name) $name =  $prefix . $name;
        return HttpHelper::getCookie($name);
    }
306860
public function offsetGet($name)
    {
        $data = [];
        if (!isset($this->_hashes[$name])) {
            throw new RuntimeException("Unexisting Set-Cookie `'{$name}'`.");
        }
        foreach ($this->_hashes[$name] as $key => $hash) {
            $data[] = $this->_data[$hash];
        }
        return $data;
    }
520815
public function getValue($name)
    {
        $cookie = $this->get($name);

        return null === $cookie ? null : $cookie->getValue();
    }
369463
public function getUser($name = null)
  {
      if (!$name) {
          $this->wrapper->checkScope('user_read');

          return $this->wrapper->request('GET', 'user', [], true);
      }

      return $this->wrapper->request('GET', "users/$name");
  }
639531
public function get(string $name): ?ResponseCookieInterface
    {
        if (!isset($this->responseCookies[$name])) {
            return null;
        }

        return $this->responseCookies[$name];
    }
1019245
public function getCookie(string $name) : ?string
    {
        return (($this->cookies->has($name) === true) ? $this->cookies->get($name)->getValue() : null);
    }
1337719
public HttpCookie getCookie(String name) {
		List<HttpCookie> cookie = getCookies();
		if (null != cookie) {
			for (HttpCookie httpCookie : cookie) {
				if (httpCookie.getName().equals(name)) {
					return httpCookie;
				}
			}
		}
		return null;
	}
810736
public final static Cookie getCookie(HttpServletRequest httpServletRequest, String name) {
		final Map<String, Cookie> cookieMap = readCookieMap(httpServletRequest);
		return cookieMap == null ? null : cookieMap.get(name);
	}
665307
public static function Read ($name) {
		static::Start();
		if (!static::IsSessionActive()) {
			throw CoreException::RaiseSystemError('セッションが開始されていないため、セッションを利用できません。');
		}
		if (is_array($name)) {
			return Arrays::GetLowest($_SESSION, $name);
		} else {
			return isset($_SESSION[$name]) ? $_SESSION[$name] : null;
		}
	}