Returns, for a given parameter, the value of this parameter in the REQUEST array.
If not set, returns the default value for this parameter @see getDefault()

@param string $nameVar
@return string|mixed Value of this parameter
178934
protected function getDefaultOrCurrent($nameVar)
    {
        if (isset($_GET[$nameVar])) {
            return Common::sanitizeInputValue($_GET[$nameVar]);
        }

        return $this->getDefault($nameVar);
    }
1089122
public function getValue($name, $default = null)
    {
        $setting = $this->get($name);

        if ($setting) {
            return $setting->getValue();
        }

        return $default;
    }
501793
public function value($name, $default = null)
    {
        if (! is_null($value = $this->valueFromOld($name))) {
            return $value;
        }

        if (! is_null($value = $this->valueFromModel($name))) {
            return $value;
        }
        return $default;
    }
1294741
public function viewVar($name = null)
    {
        if (empty($name)) {
            return $this->getConfig('viewVar') ?: $this->_deriveViewVar();
        }

        return $this->setConfig('viewVar', $name);
    }
1225022
public function get(string $name, $default = null)
    {
        $key = strtolower($name);
        if (!array_key_exists($key, $this->headers)) {
            return $default;
        }

        return $this->headers[$key]->getValuesAsString();
    }
348558
public function getDefault($name)
    {
        return isset($this->defaults[$name]) ? $this->defaults[$name] : null;
    }
349939
public function getValue($name, $default = null)
    {
        $value = array_key_exists($name, $this->config) ? $this->config[$name] : $default;

        if ($value && ($value instanceof \Closure)) {
            $value = $value();
        }

        return $value;
    }
266144
public function get($name, $default = null)
    {
        if ($this->exists($name)) {
            $data = Query::from($this->table)
                        ->where('name', '=', $name)
                        ->first();

            if ($data->lifetime >= time()) {
                return $this->unpacking($data->value);
            } else {
                $this->remove($name);

                return $default;
            }
        }

        return $default;
    }
1193909
public static function getDefaultValue($param = null)
    {
        $result = null;

        if (empty($param)) {
            return static::$defaults;
        }

        if (isset(static::$defaults[$param])) {
            $result = static::$defaults[$param];
        }

        return $result;
    }
943039
public function getVariable(string $name)
    {
        switch (true) {
            case array_key_exists($name, $_ENV):
                return $_ENV[$name];
            case array_key_exists($name, $_SERVER):
                return $_SERVER[$name];
            default:
                $value = getenv($name);

                return $value === false ? null : $value;
        }
    }
818747
public function getVar($name = null)
    {
        $context = $this->_context;

        if ($name === null) {
            return $context->vars;
        } else {
            return isset($context->vars[$name]) ? $context->vars[$name] : null;
        }
    }
685351
public function getDataDefault($name)
    {
        return isset($this->dataDefaults[$name]) ? $this->dataDefaults[$name] : null;
    }
1100005
private function getConfigVariable($var, $default = null)
    {

        if (preg_match("/^SW_/", $var)) {
            $var = strtolower(preg_replace("/SW_/", "", $var));
        }

        if (isset($this->variables["config"][$var])) {
            return $this->variables["config"][$var];
        } else {
            if (defined("SW_" . strtoupper($var))) {
                return constant("SW_" . strtoupper($var));
            }
        }

        return $default;

    }
175535
public function getParam($var = null)
    {
        $param = $this->_parameters;
        if (null !== $var) {
            if (isset($this->_parameters[$var])) {
                $param = $this->_parameters[$var];
            } else {
                $param = null;
            }
        }

        return $param;
    }
221529
protected function getDefault($name)
  {
    if (is_null($this->_defaultData)) {
      $subject = $this->getSubject();
      if (!is_null($subject) && $subject instanceof Options_Subject) {
        $this->_defaultData = $subject->getDefaultOptions();
      } else {
        $this->_defaultData = array();
      }
    }
    
    if (isset($this->_defaultData[$name])) {
      $value = $this->_defaultData[$name];
    } else {
      $value = null;
    }
    
    return $value;
  }
455180
public function getRequestParameter($name, $defaultValue = null)
    {
        if (isset($_POST[$name])) {
            $value = $_POST[$name];
        } elseif (isset($_GET[$name])) {
            $value = $_GET[$name];
        } else {
            $value = $defaultValue;
        }

        return $value;
    }
366585
public function getVariable(string $name)
    {
        foreach ($this->variables as $variable) {
            if ($variable->getName() == $name) {
                return $variable;
            }
        }

        return null;
    }