Answer the question
In order to leave comments, you need to log in
How to "customize" the system in symfony2?
There is a big system.
The system is used for different customers. But at the same time, of course, there is a common part of the code.
Now customization is done like this:
/module/custom/pathToFile
In addition, each module has a so-called standard custom. All custom are inherited only from the standard.
The factory is passed the name of the module and the path to the file / class name, it looks for a custom file. If there is, include it. If not, it will include the standard file.
How to do it smartly on sf2. It must have been done before me.
Answer the question
In order to leave comments, you need to log in
to search for modules, etc. use compilerpass for dependency injection container. It will be launched when the cache is warmup and there will be no need for these things with a check for the existence of the file. Actually, this is all that symfony can do for you. The rest is common practice, SOLID, etc. Separate all the logic into services... Try to open your question a little more, what exactly is the plug, what exactly are you not sure about, etc.
Have you looked at how the bundle system is organized in Symphony? Maybe that's exactly what you need?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question