@param string $key
@param mixed $defaultValue

@return mixed
493438
public static function request($key = null, $defaultValue = null)
    {
        if ($key == null) {
            return $_REQUEST;
        }
        $req = static::getInstance();
        if ($req->query->has($key)) {
            return $req->query->get($key);
        } else {
            if ($req->request->has($key)) {
                return $req->request->get($key);
            }
        }

        return $defaultValue;
    }
1229685
final public function when($key, $defaultValue = false)
    {
        $data = $this->data($key, false);
        return !empty($data) ? $data : $defaultValue;
    }
724222
public function value($key, $default = null)
    {
        return array_key_exists($key, $this->values)
            ? $this->values[$key]
            : $default;
    }
723479
protected function getParameter($args, $key, $defaultValue = NULL)
    {
        $value = util::array_get($args[$key]);
        return is_null($value) ? $defaultValue : $value;
    }
692477
protected function extractDefault($defaultValue)
	{
		if($this->dbType==='timestamp' )
			$this->defaultValue=null;
		else
			parent::extractDefault(str_replace(array('(',')',"'"), '', $defaultValue));
	}
332724
public function getVariable($variableName, $defaultValue = null)
    {
        return isset($this->variables[$variableName]) ?
            $this->variables[$variableName] : $defaultValue;
    }
1169742
public function get($keyName, $defaultValue = null)
    {
        $this->initList();
        $keyName = strtolower($keyName);
        if (empty($this->list[$keyName])) {
            return $defaultValue;
        }
        return $this->list[$keyName];
    }
712634
public function get($key, $default = NULL) {

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

	}
1369785
protected function extractDefault($defaultValue)
	{
		if(strncmp($this->dbType,'bit',3)===0)
			$this->defaultValue=bindec(trim($defaultValue,'b\''));
		elseif(($this->dbType==='timestamp' || $this->dbType==='datetime')  && ($defaultValue==='CURRENT_TIMESTAMP' || $defaultValue==='current_timestamp()'))
			$this->defaultValue=null;
		else
			parent::extractDefault($defaultValue);
	}
1038159
public function getValue($key, $default = null)
    {
        if (is_array($this->kwargs) && isset($this->kwargs[$key])) {
            return $this->kwargs[$key];
        }
        return $default; // @codeCoverageIgnore
    }
1000185
public function get(string $key, $default = null)
    {
        if ($this->has($key)) {
            return parent::get($key)['value'];
        }

        return $default;
    }
401138
public function getProperty($key, $defaultValue = null)
    {
        if (array_key_exists($key, $this->storage)) {
            return $this->storage[$key];
        }

        return $defaultValue;
    }
1359739
protected function value(string $key, $default)
    {
        $value = $this->queryRelate->getQuery()->value($key);

        $this->resetQueryRelate();

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

        return $value;
    }
1186876
public static function getParam($key, $defaultValue = null, $module = null)
    {
        if(null !== $module) {
            return self::getParam(strtolower($module) . '.' . $key, self::getParam($key, $defaultValue));
        }
        $param = self::getInstance()->get($key);
        return (null !== $param) ? $param : $defaultValue;
    }
832468
public function getValue($key, $default = null)
    {
        $meta = $this->meta;

        if (isset($meta[$key])) {
            return $meta[$key];
        }

        return $default;
    }
10005
public function getProperty($key, $defaultValue = null)
    {
        if (empty($this->properties[$key])) {
            return $defaultValue;
        }

        return $this->properties[$key];
    }
859227
public function getHeader($key, $defaultValue = null) {
		if (!is_string($key) || $key === '') {
			return $defaultValue;
		}

		$key = strtoupper(str_replace('-', '_', $key));

		return $_SERVER['HTTP_' . $key] ?? $_SERVER[$key] ?? $defaultValue;
	}