ServiceProvider.php 932 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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\OfficialAccount\WiFi;
  11. use Pimple\Container;
  12. use Pimple\ServiceProviderInterface;
  13. /**
  14. * Class ServiceProvider.
  15. *
  16. * @author her-cat <i@her-cat.com>
  17. */
  18. class ServiceProvider implements ServiceProviderInterface
  19. {
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function register(Container $app)
  24. {
  25. $app['wifi'] = function ($app) {
  26. return new Client($app);
  27. };
  28. $app['wifi_card'] = function ($app) {
  29. return new CardClient($app);
  30. };
  31. $app['wifi_device'] = function ($app) {
  32. return new DeviceClient($app);
  33. };
  34. $app['wifi_shop'] = function ($app) {
  35. return new ShopClient($app);
  36. };
  37. }
  38. }