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.
我是 symfony 的新手,我在文档中看到,我可以在控制器中获取和使用验证器服务,例如:
$this->get('validator');
在我编写的我自己的服务类中获取验证器服务的正确\简单方法是什么
谢谢你
像这样将它注入到服务中
your.service: class: Path\To\Your\Service arguments: [@validator]