Fetch serverRequest parameter value from body or query string (in that order).

Note: This method is not part of the PSR-7 standard.

@param  string $key The parameter key.
@param  string $default The default value.

@return mixed The parameter value.
322853
public function getParam($key, $default = null)
    {
        $postParams = $this->getParsedBody();
        $getParams = $this->getQueryParams();
        $result = $default;

        if (is_array($postParams) && isset($postParams[$key])) {
            $result = $postParams[$key];
        } elseif (is_object($postParams) && property_exists($postParams, $key)) {
            $result = $postParams->$key;
        } elseif (isset($getParams[$key])) {
            $result = $getParams[$key];
        }

        return $result;
    }
24409
public function get($key, $default = null)
  {
    $success = false;
    $value = \apcu_fetch( $key, $success );

    return ( $success ? $value : $default );
  }
398972
public function server($key = null, $default = null)
    {
        $servers = $this->getServerParams();

        return is_null($key) ? $servers : data_get($servers, $key, $default);
    }
265563
public function getPost($key, $default = false)
    {
        $value = ee()->input->get_post($key);
        if (! $value) {
            $value = $default;
        }
        
        return $value;
    }
558396
protected function getQueryStringParameter($parameter, ServerRequestInterface $request, $default = null)
    {
        return isset($request->getQueryParams()[$parameter]) ? $request->getQueryParams()[$parameter] : $default;
    }
646164
public function getPayload(string $key, $default = null)
    {
        if ($this->payload === null) {
            $contentType = $this->getHeader('Content-Type', '');
            if (!$contentType) {
                $contentType = $this->getHeader('Content-type');
            }

            if ($contentType) {
                $contentTypeParts = preg_split('/\s*[;,]\s*/', $contentType);
                $contentType = $contentTypeParts[0];
                $contentType = strtolower($contentType);
                if (isset($this->bodyParsers[$contentType])) {
                    $parser = $this->bodyParsers[$contentType];
                    $this->payload = $parser($this->body);
                }
            }
        }

        return $this->payload[$key] ?? $default;
    }
1188638
public function getCustomParam($key, $default = null)
    {
        return array_key_exists($key, $this->customParams) ? $this->customParams[$key] : $default;
    }
680568
public function get($key, $default = null)
    {
        $value = $this->fetch($key);

        return (!is_null($value)) ? $value : $default;
    }
1102350
public function input(string $key = null, $default = null)
    {
        $inputs = $this->getQueryParams() + $this->getParsedBody();
        if (is_null($key)) {
            return $inputs;
        }
        return $inputs[$key] ?? $default;
    }
658329
protected function get($key, $default = null)
    {
        $val = dot_access($this->configuration, $key);
        return $val !== null ? $val : $default;
    }
538182
public function getParam($key, $default = null)
    {
        $params = $this->params;
        if (is_array($params) && isset($params[$key])) {
            $result = $params[$key];
        } else {
            if (!is_string($default) && is_callable($default)) {
                $result = $default();
            } else {
                $result = $default;
            }
        }

        return $result;
    }
1117095
public function input($key=null, $default=null)
	{
	    if ($key && $key !== '*') {
	        return isset($_SERVER['argv'][$key]) ? $_SERVER['argv'][$key] : $default;
	    } else {
	        return isset($_SERVER['argv']) ? $_SERVER['argv'] : [];
	    }
	}
435072
public function getBodyParam($key, $default = null)
    {
        $params = $this->getBodyParams();
        if (array_key_exists($key, $params)) {
            return $params[$key];
        }
        return $default;
    }
810783
private function get($key, $default = null)
    {
        if (isset($this->responseData['error'][$key])) {
            return $this->responseData['error'][$key];
        }

        return $default;
    }
516138
public function getQueryParameter($key, $defaultValue = null)
    {
        if (array_key_exists($key, $this->getParameters)) {
            return $this->getParameters[$key];
        }

        return $defaultValue;
    }
278116
public static function get($key, $default = null)
    {
        return isset(self::$variables[$key]) ? self::$variables[$key] : $default;
    }
1366932
public static function server($key = null, $default = null)
        {
            return arrayGet(static::foundation()->server->all(), Inflector::upper($key), $default);
        }