Answer the question
In order to leave comments, you need to log in
How is it architecturally better to solve such a problem (from the point of view of OOP)?
In the framework that they work with, there is some built-in class - EventManager.
Which is able to add, register event handlers, etc.
I would like to simplify the signature of one of the methods (so that the input parameters have a completely different format).
For example:
there was a method AttachEventHandler(module, type, handler) and I made this method:
SimpleAttachEventHandler(config) {
// тут делаю еще какие-то дела
AttachEventHandler(config.module, config.type, config.handler); // т.е. внутри своего метода я дергаю тот же метод фреймворка
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question