Cylon
Member
Hi!
I'm in the process of developing an addon. And I have wroten many helper classes to perform some tasks. These classes are not Repositories, nor Finders, nor Entities. Because of that when I need one of these helper classes, I get an instance of them with new MyHelperClass() (for the finders and repositories, I use the xf way of getting instances).
I was wondering if there is already a way to get an instance of my helper classes per DI, o maybe there is a recommended way? When not, then I'm considering implementing a third party DI manager, or not implementing it at all, because they are only five or six classes, without complex interdependencies... Maybe in the future the complexity of my addon grows... but not at the moment.
What do you think?
Thanks.
I'm in the process of developing an addon. And I have wroten many helper classes to perform some tasks. These classes are not Repositories, nor Finders, nor Entities. Because of that when I need one of these helper classes, I get an instance of them with new MyHelperClass() (for the finders and repositories, I use the xf way of getting instances).
I was wondering if there is already a way to get an instance of my helper classes per DI, o maybe there is a recommended way? When not, then I'm considering implementing a third party DI manager, or not implementing it at all, because they are only five or six classes, without complex interdependencies... Maybe in the future the complexity of my addon grows... but not at the moment.
What do you think?
Thanks.