panique / huge

Simple user-authentication solution, embedded into a small framework.
2.14k stars 788 forks source link

Routing! #830

Closed abmmhasan closed 7 years ago

abmmhasan commented 8 years ago

Are you controlling the Routing using only core/view.php file? As I think so! If I'm wrong is there any other files involved on routing? I was reviewing (for the first time) the huge 3.0 project!

panique commented 8 years ago

Hi there, no sorry the routing is more or less done via the logic in https://github.com/panique/huge/blob/master/application/core/Application.php, so when the user hits a URL like ".../user/view/17", then the framework will look if there's a controller called "UserController" with a method "view", call this and pass the parameter "17" to the "view" method.

Most big frameworks have real routing where you can configurate where exactly every URL path should go to, but in this frameworks it's just made in this supersimple way!