container.php 892 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * This file is part of webman.
  4. *
  5. * Licensed under The MIT License
  6. * For full copyright and license information, please see the MIT-LICENSE.txt
  7. * Redistributions of files must retain the above copyright notice.
  8. *
  9. * @author walkor<[email protected]>
  10. * @copyright walkor<[email protected]>
  11. * @link http://www.workerman.net/
  12. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  13. */
  14. // 如果你需要自动依赖注入(包括注解注入)。
  15. // 请先运行 composer require php-di/php-di && composer require doctrine/annotations
  16. // 并将下面的代码注释解除,并注释掉最后一行 return new Webman\Container;
  17. /*$builder = new \DI\ContainerBuilder();
  18. $builder->addDefinitions(config('dependence', []));
  19. $builder->useAutowiring(true);
  20. $builder->useAnnotations(true);
  21. return $builder->build();*/
  22. return new Webman\Container;