G
G
galithr2016-09-01 15:11:58
Yii
galithr, 2016-09-01 15:11:58

Passing a class to a module, what's the best way to do it?

There is a need to make the module and all its contents relatively independent and portable. But the problem is that inside the module some classes are used that are common to all modules (from the project root). Because the module needs to be made portable. Connecting classes directly to the module is not an option, you need to somehow organize the transfer of these classes to the module, for example, at the time of connection or something else. What is the best way to do this? is there something ready yii2 for these purposes?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2016-09-01
@galithr

Good afternoon.
I think these articles will help you.
times
two
three
The topic is very interesting, these articles are one of the options for organizing portable modules.

M
Michael, 2016-09-01
@springimport

As one of the developers of Yii advised - "to do better through interfaces."

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question