Arrayless multi arg function definitions
fabulousduck opened this issue · comments
In the current version, the underlying code for defineAction
uses __call
to create an anonymous function.
This way, an array of arguments is passed to the function which you will then need to index in the function itself.
This is in my opinion not a very good approach and should be fixed to simply take all arguments separately.
there are 2 possible solutions for this.
- named array elements
this way we at least have a superglobal like way to access the params - replace
__call
withcall_user_func
This way is not a way i prefer but would allow for direct pass through of arguments.
which one of these we will use will have to be decided based upon how deprecated call_user_func
is