copona icon indicating copy to clipboard operation
copona copied to clipboard

Experimental Hooks

Open janistravins opened this issue 8 years ago • 3 comments

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.

janistravins avatar Apr 12 '17 10:04 janistravins

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.

prhost avatar Apr 12 '17 18:04 prhost

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.

arnisjuraga avatar Apr 12 '17 19:04 arnisjuraga

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.

prhost avatar Apr 17 '17 14:04 prhost