public function getParam($name, $typeOf = 'string')
    {
        $result = $this->hasParam($name) ? $this->params[$name] : null;
        
        switch ($typeOf) {
            case 'bool':
            case 'boolean':
                $result = function_exists('boolval') ? boolval($result) : (bool) $result;
                break;
            
            case 'double':
            case 'float':
                $result = doubleval($result);
                break;
            
            case 'int':
                $result = intval($result);
                break;
            
            case 'string':
            default:
                $result = htmlentities(strval($result));
                break;
        }
        
        return $result;
    }