How to update value by Events in CodeIgniter 4 |
PHP.net - Anonymous functions
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
I did not test this but try it no time right now.
PHP Code: use CodeIgniter\Events\Events; What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Try adding the return back, but I don't think that will work.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Sorry, I was wrong.
Events have one direction. If you need to modify the data and get it back, then it is better to use a simple function instead of using events. If you still want to use events, then it's easier to implement through object wrapping. Objects are always passed by reference. |
Welcome Guest, Not a member yet? Register Sign In |