public function generateUrl($route_infos, $base_uri = null, $hash = null, $separator = '&amp;')
    {
        $url_args = $this->getArgumentsMap()->getCollection();

        $url = $base_uri;

        if (is_array($route_infos)) {
            $final_params = array();
            foreach ($route_infos as $_var=>$_val) {
                if (!empty($_val)) {
                    $arg = in_array($_var, $url_args) ? array_search($_var, $url_args) : $_var;
                    $_meth = 'toUrl'.TextHelper::toCamelCase($_var);
                    if (method_exists($this, $_meth)) {
                        $_val = call_user_func_array(array($this, $_meth), array($_val));
                    }
                    if (is_string($_val)) {
                        $final_params[$this->urlEncode($arg)] = $this->urlEncode($_val);
                    } elseif (is_array($_val)) {
                        foreach($_val as $_j=>$_value) {
                            $final_params[$this->urlEncode($arg).'['.(is_string($_j) ? $_j : '').']'] = $this->urlEncode($_val);
                        }
                    }
                }
            }
            $url .= '?'.http_build_query($final_params, '', $separator);
        }

        if (!empty($hash)) $url .= '#'.$hash;
        return $url;
    }