src/Mvc/Controller/Request.php
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;
    }
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;
    }
Get value of particular parameter

@param string $name
The name of parameters
@param string $typeOf
The type expected parameter value
@return mixed Depending on $typeOf the value as requested type and escaped