public function getBooleanParam($name, $default = null, $optional = false)
    {
        $value = $this->getParam($name, $default, $optional);
        if ($value !== null) {
            if (!is_bool($value) && !preg_match('/^(0|1|true|false)$/', $value)) {
                throw new InvalidParameterException("Parameter '{$name}' is invalid");
            }
            $value = $value === true || $value === '1' || $value === 'true';
        }
        return $value;
    }