Code snippets for symfony 1.x
You want to get the module, action and parameters associated to a given url, pretty much as the routing system does.
First you will have to remove the part of the url which is not symfony specific. That part typically looks like
yoursite.com/path/to/symfony. Once you've done that execute the following code:
$r = new sfRouting(); $r->setRoutes(sfRouting::getInstance()->getRoutes()); $params = $r->parse($myUrl); $module = $params['module']; $action = $params['action'];
Now the module and action associated to this url are as above in
$action and the parameters are the remaining elements of the array