protected function params($names = array(), $reqMode = null, $defaults = null)
    {
        // no names given -> get them all
        if (!$names) {
            $names = $this->getAllParamNames($reqMode);
        }
        $res = array();
        foreach ($names as $obj) {
            $name  = is_array($obj) ? $obj[0] : $obj;
            $param = $this->param($name, $reqMode);
            if (!is_null($param) && (!is_array($param) || !empty($param))) {
                $res[$name] = $param;
            } // if in "need all" mode
            elseif ($defaults === true) {
                return null;
            } // if in default mode
            elseif (is_array($defaults) && isset($defaults[$name])) {
                $res[$name] = $defaults[$name];
            }
        }

        return $res;
    }