symfony - How to use $this->get non-bundle in your own newly created class.
我想大声告诉你
我想大声告诉你 2017-05-16 16:43:43
0
2
504
  1. I am using edusoho. It is developed based on symfony2. There is a service folder in it that provides operations on the database (not the service in the configuration file in symfony2). This service is not a bundle and is not in registerBundles. Registration is actually a lot of folders containing custom classes. I want to use $this->get in this custom class to obtain services just like using $this->get in the controller. How to do it? Woolen cloth?

我想大声告诉你
我想大声告诉你

reply all(2)
滿天的星座

。。。。。。。

PHPzhong

This depends on container and you need to inject it

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template