private function PageRule(Page $page, array $params)
    {
        $lhs = $page->GetUrl();
        foreach ($params as $param)
        {
            $lhs = str_replace('{' . $param . '}', self::PARAM_PATTERN, $lhs);
        }
        
        $rhs = 'index.php';
        $idx = 1;
        
        foreach ($params as $param)
        {
            $rhs .= $idx > 1 ? '&' : '?';
            $rhs .= $param . '=$' . $idx;
            ++$idx;
        }
        $rhs .= '&' . self::PAGE_URL_PARAM . '=' . $page->GetUrl();
        $rule = new RewriteRule($lhs, $rhs);
        $rule->AddFlag(new CommandFlag(FlagType::Qsa()));
        $rule->AddFlag(new CommandFlag(FlagType::L()));
        return $rule;
    }
private function PageRule(Page $page, array $params)
    {
        $lhs = $page->GetUrl();
        foreach ($params as $param)
        {
            $lhs = str_replace('{' . $param . '}', self::PARAM_PATTERN, $lhs);
        }
        
        $rhs = 'index.php';
        $idx = 1;
        
        foreach ($params as $param)
        {
            $rhs .= $idx > 1 ? '&' : '?';
            $rhs .= $param . '=$' . $idx;
            ++$idx;
        }
        $rhs .= '&' . self::PAGE_URL_PARAM . '=' . $page->GetUrl();
        $rule = new RewriteRule($lhs, $rhs);
        $rule->AddFlag(new CommandFlag(FlagType::Qsa()));
        $rule->AddFlag(new CommandFlag(FlagType::L()));
        return $rule;
    }
private function PageRule ( Page $ page , array $ params ) { $ lhs = $ page -> GetUrl ( ) ; foreach ( $ params as $ param ) { $ lhs = str_replace ( '{' . $ param . '}' , self :: PARAM_PATTERN , $ lhs ) ; } $ rhs = 'index.php' ; $ idx = 1 ; foreach ( $ params as $ param ) { $ rhs .= $ idx > 1 ? '&' : '?' ; $ rhs .= $ param . '=$' . $ idx ; ++ $ idx ; } $ rhs .= '&' . self :: PAGE_URL_PARAM . '=' . $ page -> GetUrl ( ) ; $ rule = new RewriteRule ( $ lhs , $ rhs ) ; $ rule -> AddFlag ( new CommandFlag ( FlagType :: Qsa ( ) ) ) ; $ rule -> AddFlag ( new CommandFlag ( FlagType :: L ( ) ) ) ; return $ rule ; }
Returns the page rule
@param Page $page
@param array $params
@return RewriteRule
Returns the page rule