There is an abstract factory. It has a get method:

abstract class Factory { public static function get(string $action): Action { return new $payment; // нужно как-то di использовать } } 

The Action classes themselves contain dependencies that are loaded via DI. Dependencies also have dependencies. And there are several levels of addiction. How to make a factory so that Action pulls up with dependencies?

Used by symfony 3.4

  • one
    And in the official documentation, everything seems to be there. Did not try to read? - ArchDemon

0