Retrieve a value from url query or message body.

@param string $key
@param null $default

@return mixed
514138
public function getParameter($key, $default = null) {
        $value = $this->getUrl()->getQuery()->get($key);

        if ($value === null) {
            $value = $this->getData()->get($key, $default);
        }

        return $value;
    }
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;
    }
413619
public function get(string $key, $default = null)
    {
        $messages = $this->all();

        return isset($messages[$key]) ? $messages[$key] : $default;
    }
114962
public function get($key, $default = NULL) {

		return array_key_exists($key, $this->data) ? $this->data[$key] : $default;

	}
870550
public function getUserParam($key, $default = null)
        {
            if (isset($this->_params[$key])) {
                return $this->_params[$key];
            }

            return $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;
    }
1203398
public function get($key, $default = null)
    {
        $value  = $this->raw($key, $default);
        $escape = $this->escape;
        return $escape($value);
    }
52800
public static function get($key, $default=null) {
		if( !isset(static::$main) ) {
			return $default;
		}
		return isset(static::$main->$key) ? static::$main->$key : $default;
	}
105216
static public function get($key = null, $default = null) {
        if (is_null($key)) return json_decode(json_encode(self::$_config));
        
        $config = &self::$_config;
        
        return Utils::arrayGet($config, $key, $default);
    }
1286686
public function get($key, $default = null)
    {
        $this->checkLoaded();

        return Arr::get($this->data, $key, $default);
    }
1032407
public function get( $key = null, $default = null ) {
		return func_num_args() === 0 ? $_GET : $this->app->utility->array_get( $_GET, $key, $default );
	}
995028
public function get($key, $default = null) {
		$this->check();
		$value = $this->readValue($key);
		return is_null($value) ? $default : $value;
	}
1224974
public static function getUserParam($key, $default = null)
  {
    return (array_key_exists($key, $_REQUEST) && !empty($_REQUEST[$key])) ? self::stripslashesRecursive($_REQUEST[$key]) : $default;
  }
1359739
protected function value(string $key, $default)
    {
        $value = $this->queryRelate->getQuery()->value($key);

        $this->resetQueryRelate();

        if (empty($value)) {
            $value = $default;
        }

        return $value;
    }
1361961
public function get($key, $default = null)
    {
        $this->start();
        
        $value = isset($_SESSION[$key]) ? $_SESSION[$key] : '';
        
        \Wslim\Ioc::logger('session')->debug(sprintf('[%s]get %s:%s', static::getId(), $key, print_r($value, true)));
        
        return $value;
    }
1275693
public static function getSessParam($key, $default = null)
  {
    return (array_key_exists($key, $_SESSION) && !empty($_SESSION[$key])) ? $_SESSION[$key] : $default;
  }
352489
public function getParam($key = null, $default = null)
    {
        if (!isset($key)) {
            return $this->params;
        }

        foreach ((array) $key as $k) {
            if (isset($this->params[$k])) {
                return $this->params[$k];
            }
        }

        return $default;
    }