Retrieve a cookie from the request

@param null|string $key
@param null|mixed  $default
@return array|string|mixed
191717
public function cookie(string $key = null, $default = null)
    {
        if (is_null($key)) {
            return $this->getCookieParams();
        }
        return $this->getCookieParams()[$key] ?? $default;
    }
342715
public function get($key, $default = null)
    {
        return isset($_SESSION) && isset($_SESSION[$key])
            ? $_SESSION[$key]
            : $default;
    }
226830
public static function get($key, $default = null) {
        $value = Hash::get(static::$_config, $key);

        if ($value === null) {
            return $default;
        }

        return $value;
    }
1286686
public function get($key, $default = null)
    {
        $this->checkLoaded();

        return Arr::get($this->data, $key, $default);
    }
656646
public function get($key, $default = null) {
        if (strpos($key, '.') === false) {
            $value = isset($this->_data[$key]) ? $this->_data[$key] : null;
        } else {
            $value = Hash::get($this->_data, $key);
        }

        if ($value === null) {
            return $default;
        }

        return $value;
    }
1237751
protected function json($key = null, $default = null)
    {
        if (null === $key) {
            return Request::json()->all();
        } else {
            return Request::json($key, $default);
        }
    }
1285567
public function request( $key = null, $default = null ) {
		return func_num_args() === 0 ? $_REQUEST : $this->app->utility->array_get( $_REQUEST, $key, $default );
	}
1005232
public function get($key = null, $default = null)
	{
		if ( is_null($key) )
		{
			return $this->get;
		}

		return Arr::get($this->get, $key, $default);
	}
114542
public function get($key, $default = null)
    {
        return array_key_exists($key, $this->consumers) ? $this->consumers[$key] : $default;
    }
676313
public static function getState($key, $default = null)
	{
		$session  = self::$app->get('session');
		$registry = $session->get('registry');

		if (!is_null($registry))
		{
			return $registry->get($key, $default);
		}

		return $default;
	}
1370321
function get($key, $default = null)
	{
		return $_GET[$key] ?? $this->params[$key] ?? $_POST[$key] ?? $_REQUEST[$key] ?? $default;
	//	return $post && isset($_POST[$name]) ? $_POST[$name] : ($get && isset($_GET[$name]) ? $_GET[$name] : $default);
	}
52721
public function cookie($key = null, $default = null)
    {
        $cookies = $this->getCookieParams();

        return is_null($key) ? $cookies : data_get($cookies, $key, $default);
    }
1176700
protected function cookie($key = null, $default = null, $deep = false)
    {
        return $key === null ? $this->getCookie()->all() : $this->getCookie()->get($key, $default, $deep);
    }
810783
private function get($key, $default = null)
    {
        if (isset($this->responseData['error'][$key])) {
            return $this->responseData['error'][$key];
        }

        return $default;
    }
36116
public function cookies($key = null)
    {
        if ($key) {
            return $this->cookies->get($key);
        }

        return $this->cookies;
       
    }
873666
public function get($key = null, $default = null)
	{
		$return = $this->data;

		if ($key !== null) {
			$keys = explode('.', $key);

			foreach ($keys as $key) {
				if (isset($return[(string) $key])) {
					$return = $return[$key];
				} else {
					$return = $default;
					break;
				}
			}
		}

		return $return;
	}
267748
public static function get($key, $default = null) {

		if(false === is_string($key)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($key)), E_USER_ERROR);
		}

		if(true === isset(static :: $data[$key])) {
			return static :: $data[$key];
		}

		$key = rtrim(base64_encode($key), '=');

		if(true === isset(static :: $data[$key])) {
			
			$cookie = Hash :: decrypt(base64_decode(static :: $data[$key]), Application :: get('salt'));
			return false !== $cookie ? $cookie : $default;
		}

		return $default;
	}