Experimental Hooks
Hi! We have started the new experiment. With "hooks", not used by Opencart Event triggers.
https://github.com/copona/copona/commit/70ac47356bf7bd071ef02878243b9c0dacb09e23
Keep in mind, this is just a beginning of an experiment. We'll see, how it goes :) But at the moment - this fits our needs for some projects, - that we can change and modify Opencart Data completely from theme! No need to modify core source.
This is something we have been looking for for a while.
Please, feel free to discuss.
Only works with functions? I particularly do not like it much, but there are some very complete and interesting event libraries. If it was to trade something for the Opencart Event, then I'd support doing something more robust.
Yes, it works with functions. But they are called from within Hook class. So you can pass any arguments or objects.
Any useful library is welcomed, just at the moment it is something to start with.
I started using illuminate/container instead of the opencart registry, and it already has event support. But implementing illuminate/container in copona requires a very big change, and I was doing it in the dev branch, but I do not know if that's what they want for now.