I have the following dependencies that need to be configured at the beginning of my program:
//Set up dependencies $fileSettings = array(12, 'extra_lines', 'close_on_save'); $exporter = new Exporter('exporterpath/filename.txt', $fileSettings); $outputStream = new OutputStream(); $businessModel = new BusinessModel('param1', 'param2'); //Run application $application = new Application($exporter, $outputStream, $businessModel); $application->start();
So, you can see that I have several dependencies for my main application, and this is the code needed to bootstrap so that everything is necessary.
Does this mean that the container is for dependency injection?
If not, is the factory method applicable?
user1526099
source share