【发布时间】:2018-04-08 18:47:09
【问题描述】:
我正在我的应用上实现套接字,所以我执行了以下步骤:
-
创建主题处理程序服务,例如 this,但在其
__construct方法上使用实体管理器。public function __construct(EntityManager $em, ClientManipulatorInterface $client) { $this->em = $em; $this->client = $client; } -
向 symfony 注册你的服务。
2.1。文件
services.yml如下所示:foo.topic: class: AppBundle\Topic\FooTopic arguments:["@doctrine.orm.personem_entity_manager", "@gos_web_socket.websocket.client_manipulator"] tags: -{ name: gos_web_socket.topic}here 是当我在传递的第一个参数中收到错误 Missing service 时。 我找不到我的实体管理器,但我已在我的 conf 文件中声明它。
personem: dql: string_functions: convert: AppBundle\Dql\ConvertFunction connection: connection mappings: GptIReunionBundle: ~ AppBundle: ~
有什么想法吗?
【问题讨论】:
标签: php symfony entitymanager symfony-3.3 phpwebsocket