Question

I just stumbled at Phalcon (PHP framework) and it looked so promising I decided to try it.

I searched in the docs but haven't found anything related to routes in Phalcon. Does somebody know how to create custom routes in this framework or am I supposed to always follow conventions?

If you don't know Phalcon yet you might want to look at these slides to see what it's about.

Was it helpful?

Solution

They replied to the request and have just implemented the custom routes, it doesn't look that good right now but here is the reference:

$router->add("/admin/:controller/a/:action/:params", array(
    "controller" => 1,
    "action" => 2,
    "params" => 3,
));

Links:

OTHER TIPS

I'm pretty sure you'll have to stick with the baseDir/class/method/argument/... convention.

I read the documentation and the source code, and I don't see any hint that would allow you to handle custom routes relying only on the C extension. One possible solution would be to map them in .htaccess.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top