Locker\Request::getParam PHP Method

getParam() public method

Gets a param from the stored/cached params.
public getParam ( String $key, mixed $default = null ) : mixed
$key String Param to be retrieved.
$default mixed Value to be returned if the param is not set.
return mixed Value of the param.
    public function getParam($key, $default = null)
    {
        // If the key has been set then return its value.
        if ($this->hasParam($key)) {
            return $this->getParams()[$key];
        } else {
            return $default;
        }
    }