Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在考虑编写自己的控制台命令。我注意到它使用容器感知?这是什么?
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
它使您可以在命令中访问服务容器,以便您可以从中获取服务。