ServiceProvider.php 707 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /*
  3. * This file is part of the overtrue/wechat.
  4. *
  5. * (c) overtrue <i@overtrue.me>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace EasyWeChat\MiniProgram\CustomerService;
  11. use EasyWeChat\OfficialAccount\CustomerService\Client;
  12. use Pimple\Container;
  13. use Pimple\ServiceProviderInterface;
  14. /**
  15. * Class ServiceProvider.
  16. *
  17. * @author overtrue <i@overtrue.me>
  18. */
  19. class ServiceProvider implements ServiceProviderInterface
  20. {
  21. /**
  22. * {@inheritdoc}.
  23. */
  24. public function register(Container $app)
  25. {
  26. $app['customer_service'] = function ($app) {
  27. return new Client($app);
  28. };
  29. }
  30. }