igniphp / framework

Swoole, PSR-15, PSR-7, PSR-11 lightweight modular anti-framework for REST micro-services.
MIT License
265 stars 14 forks source link

Router use private properties which disable any route listing #10

Closed smalot closed 6 years ago

smalot commented 6 years ago

I'm looking for exposing all available routes for debug purpose or may be to create a swagger file. Because route collection is a private property, I'm not able to override the Router class to handle it.

Can you change property scope for "protected" ?

smalot commented 6 years ago

Could you too create an interface for the Router ? Based on the fact that it can be overriden using depndency injection.

dkraczkowski commented 6 years ago

@smalot I have created PR with proposed Route and Router interfaces. Please review if you can. https://github.com/igniphp/framework/pull/16