Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Adding a RouteInterface definition #39

Open
visto9259 opened this issue Jun 9, 2017 · 3 comments
Open

Adding a RouteInterface definition #39

visto9259 opened this issue Jun 9, 2017 · 3 comments

Comments

@visto9259
Copy link

visto9259 commented Jun 9, 2017

Hi,

I started using this microframework about a week ago. Works great especially when integrating with a ZF3 framework or resuing existing ZF3 modules.

I wrote a lot of route handlers and got a little lazy at figuring out what the __invoke function should have as arguments. So I wrote a Route Interface definition to ensure compliance with how handlers are invoked.

If you are interested, I forked the project and added RouteInterface.php under the src folder.

I am quite new to GitHub as a contributor and I am not sure about how to do pull requests and such.

Thanks
Eric

@curtiskelsey
Copy link

curtiskelsey commented Oct 11, 2017

+1 to the idea of an interface. I would name it HandlerInterface personally though instead of RouteInterface. I think the latter would be a bit ambiguous. There is a lot of flexibility to how a handler is registered so it may be good to have a couple different interfaces such as one for invokable classes and another for a predefined, named method in classes.

@visto9259
Copy link
Author

Thanks for the support @kelsey9649 !
I agree that HandlerInterface would be better more generic name for the interface.

@visto9259
Copy link
Author

visto9259 commented Nov 15, 2019

Just created a pull request for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants