Returns the value of a single query string parameter.
@param  string $parameter
@param  mixed  $default
@return mixed
173450
public function getParameter($parameter, $default = null)
    {
        if (!isset($this->parameters[$parameter])) {
            return $default;
        }

        return $this->parameters[$parameter];
    }
815995
protected function wrapPHPValue($parameter)
    {
        switch ($parameter['default']['type']) {
            case 'null':
                return 'null';
                break;

            case 'string':
            case 'char':
                return '\''.addslashes($parameter['default']['value']).'\'';
                break;

            case 'empty-array':
                return 'array()';
                break;

            case 'array':
                $parameters = [];

                foreach ($parameter['default']['left'] as $value) {
                    $source = '';

                    if (isset($value['key'])) {
                        $source .= $this->wrapPHPValue([
                            'default' => $value['key'],
                            'type' => $value['key']['type'],
                        ]).' => ';
                    }

                    $parameters[] = $source.$this->wrapPHPValue([
                        'default' => $value['value'],
                        'type' => $value['value']['type'],
                    ]);
                }

                return 'array('.implode(', ', $parameters).')';
                break;

            case 'static-constant-access':
                return $parameter['default']['left']['value'].'::'.$parameter['default']['right']['value'];
                break;

            case 'int':
            case 'double':
            case 'bool':
                return $parameter['default']['value'];
                break;

            default:
                throw new Exception('Stubs - value with type: '.$parameter['default']['type'].' is not supported');
                break;
        }
    }
935992
public function getParameter($parameterName, $defaultValue = null)
    {
        if ($this->getConfigResolver()->hasParameter($parameterName)) {
            return $this->getConfigResolver()->getParameter($parameterName);
        }

        return $defaultValue;
    }
1000185
public function get(string $key, $default = null)
    {
        if ($this->has($key)) {
            return parent::get($key)['value'];
        }

        return $default;
    }
217843
public function query(string $key = null, $default = null)
    {
        if (is_null($key)) {
            return $this->getQueryParams();
        }
        return $this->getQueryParams()[$key] ?? $default;
    }
89033
protected static function getParameter($parameter)
    {
        if (is_bool($parameter)) {
            if (!$parameter) {
                return '0 (boolean)';
            }

            return '1 (boolean)';
        }

        if (is_string($parameter)) {
            if (!$parameter) {
                return '(empty string))';
            }
        }

        return print_r($parameter, true);
    }
532698
private function getDefaultAsExpr($parameter)
    {
        $expr = $this->parser->parse('<?php ' . var_export($parameter->getSchema()->getDefault(), true) . ';')[0];

        if ($expr instanceof Stmt\Expression) {
            return $expr->expr;
        }

        return $expr;
    }
806879
public function getParam($name, $default = null)
    {
        $params = $this->_context->params;
        return isset($params[$name]) ? $params[$name] : $default;
    }
1307760
public function getParam($key, $default = null)
    {
        if (isset($this->parameters[$key])) {
            return $this->parameters[$key];
        }

        return $default;
    }
942844
public function getParam($key = null, $default = null)
    {
        if (null === $key) {
            return $_GET;
        }
        return (isset($_GET[$key])) ? $_GET[$key] : $default;
    }
310012
protected function getParameter(\ReflectionParameter $parameter)
    {
        if ($parameter->isOptional()) {
            return $parameter->getDefaultValue();
        }

        $type = (string)$parameter->getType();
        return $this->get($type);
    }
999654
public function getParam($key = null, $default = null)
    {
        if (null === $key) {
            return $this->data[self::P_PARAMS];
        }

        return $this->hasParam($key) ? $this->data[self::P_PARAMS][$key] : $default;
    }
702045
public function get($parameter = null) {

        if ( empty($parameter) ) {

            $return = $this->parameters;

        } else if ( array_key_exists($parameter, $this->parameters) ) {

            $return = $this->parameters[$parameter];

        } else {

            $return = null;

        }

        return $return;

    }
550247
public function get($parameter, $default = null)
    {
        if ('link' == $parameter) {
            return $this->getLink();
        }

        return isset($this->config[$parameter]) ? $this->config[$parameter] : $default;
    }
559586
public function normalizeValue(Parameter $parameter, string $value = null)
    {
        if (\is_bool($default = $parameter->default())) {
            return !$default;
        }

        if ($parameter->variadic()) {
            return (array) $value;
        }

        if (null === $value) {
            return $parameter->required() ? null : true;
        }

        return $parameter->filter($value);
    }
18865
public function getRequestPage($default = 1)
    {
        if (empty($this->requestPage)) {
            $this->requestPage = abs($this->getRequestArg(
                $this->pageArgName,
                $default
            ));
        }

        return $this->requestPage;
    }
99093
protected function _parameter_default($key, $default = NULL)
	{
		if ( ! array_key_exists($key, $this->_parameters))
		{
			return $default;
		}
		return $this->_parameters[$key];
	}