izniburak/php-router

Route plugins

AlexJMcloud opened this issue · 4 comments

Hello. I want to say a huge thank you for the PDO component. With some modifications for his project, he proved himself very well. But I faced such problem. Made dynamic additions of modules (plugins). But I did not understand how to add controllers to routes. You have implemented only one route for controllers.

My structure:
app
-controllers
-module
-plugins
--{name_plugin}
---controllers
---module
---view
-view

how do i make a route? help me please.

Hi @AlexJMcloud ,

Thanks for your feedback about the libraries. I'd glad to hear that.
For your question; PHP Router doesn't have the modules/plugins support yet. Actually, I didn't think about that before. Maybe, we can try something about that. For now, I'm working on new version of the packages like PHP Router and PDOx because of the fully PHP 8 compatibility. I'll add your suggestion into the my ToDo list.

Thanks.

Thanks

Good afternoon. Based on your class, I still made routing taking into account plugins. But the solution is based on namespace.
I also added routes from the array obtained from the configuration file. If you're interested, I can post it or email it to you.

Hi @AlexJMcloud ,
Sounds great! You can reach me via email. I can check your message and we can think about that. Thanks.