Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Will you update to Slim Framework 3? #40

Open
leroy0211 opened this issue Sep 10, 2015 · 4 comments
Open

Will you update to Slim Framework 3? #40

leroy0211 opened this issue Sep 10, 2015 · 4 comments

Comments

@leroy0211
Copy link

I am wondering if you would update to be compatible with Slim Framework 3 when it will be in stable release.

@ctsstc
Copy link

ctsstc commented Sep 18, 2016

This would be awesome : )

@ctsstc
Copy link

ctsstc commented Sep 18, 2016

@leroy0211 Just ran across this article, they're making it sound this is normal bake-in functionality in Clim Framework 3
http://juliangut.com/blog/slim-controller

@leroy0211
Copy link
Author

@ctsstc it is kinda the same. There is something like a Controller way right inside SF3, but it's all "static", just like calling call_user_func('Class::method'). The constructor of that Class will never be called, therefor something like dependency injection with Pimple or my own Symfony DI Bridge is never possible.

What really would be interesting is that routes can be configured, but on a dynamic level. And all object oriented instead of calling methods statically.

EG:
the route /hello can be attached to a controller called: "HelloController". Every method suffixed with Action is a subroute on the /hello route. For example a public function worldAction() can be called as /hello/world.

Or if you would like to specifically assign routes to methods this would be configurable too. Like the / route must be attached to the HomeController::indexAction() method.
Or by taking it to the next level, that a route can be attached to another route configuration.

For example /bye route will be configured to watch to another config section where /cruel route is being attached to a controller called JustAnotherController. In that controller is a method public function worldAction() so the route /bye/cruel/world is being created to match the right controller-action (but this might be too many steps forward).

@yaworsw
Copy link
Contributor

yaworsw commented Oct 6, 2016

This would be a great https://hacktoberfest.digitalocean.com/ project 😉

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

3 participants