assume open the url "/foo/bar/a:b/c/d" in browser, then in
PostsController:

debug($this->here);
get "/foo/bar/a:b/c/d"

debug(Router::parse($this->here));

gets:
Array
(
    [pass] => Array
        (
            [0] => c
            [1] => d
        )

    [named] => Array
        (
            [a] => b
        )

    [controller] => foo
    [action] => bar
    [plugin] =>
)


debug(Router::normalize(Router::parse($this->here)));
expects  something like "/foo/bar/a:b/c/d"
but gets "/foo/bar/pass:Array/named:Array"

I tried:
$here = Router::parse($this->here);
debug(Router::normalize(am($here['named'], $here['pass'],
array('controller' => $here['controller'], 'action' =>
$here['action']))));
gets "/foo/bar/c/d/a:b"
seems working but ugly.

is there a better Router method for doing this ?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to