logo
  • 教程列表
  • SO官方文档
  • 服务容器
    • 从容器中检索服务
  1. StackOverflow 文档
  2. symfony 教程
  3. 服务容器
  4. 从容器中检索服务

从容器中检索服务

Created: November-22, 2018

$logger = $container->get('logger');

这将从容器中获取服务 IDlogger 的服务,该容器实现 Psr\Log\LoggerInterface。

  • 服务容器

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明