darya / framework

PHP Web Application Framework
http://darya.io/
MIT License
2 stars 1 forks source link

Reduce router complexity #10

Open hexus opened 9 years ago

hexus commented 9 years ago

Improve the simplicity of Router by once again extracting Dispatcher.

Instead of a dispatcher accepting a router, a router should be able to accept different dispatchers and also have a default implementation that it instantiates for itself (i.e. the current implementation).

Not only does this enhance the coherence of the framework, it also allows for custom dispatchers to be provided to the router.

hexus commented 6 years ago

Maybe custom dispatchers would be overkill, but resolving controllers and dispatching them can indeed be extracted.