laminas / laminas-mvc

Laminas's event-driven MVC layer, including MVC Applications, Controllers, and Plugins

Home Page:https://docs.laminas.dev/laminas-mvc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inject parameters into controller actions

CaptainQuirk opened this issue · comments

Feature Request

Q A
New Feature yes
RFC no
BC Break no

Summary

The summary of the problem I encountered can be found on the Laminas forum.

In short, I would like to be able to inject parameters into controller action functions so that I don't have to fetch/cast them via the Request object, either on top of the action, producing a large clutter of repetitive code lines, neither throughout in the code to avoid the clutter which only makes it more difficult to understand the request the action is supposed to handle.

The mechanism I'm referring too is achieved in the Symfony world with Param Converters or with the @RequestBody annotation in Spring Framework