Answer the question
In order to leave comments, you need to log in
Where does Symfony insert a container into Controllers?
interface ContainerAwareInterface implies a call to setContainer(ContainerInterface $container = null); - I can't find where in Symfony this happens. Found only RegisterControllerArgumentLocatorsPass where this method is simply ignored.
I want to do something similar to controllers. Based on the Interface and inheritance from an abstract class with additional functionality. As I understand it, I cannot add a constructor to an abstract class, since these classes will be automatically created. You can add services as a Setter, by type setContainer in AbstractController.
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