ExternalClientProvider.php 632 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace app\common\services\easyWechat\providers;
  3. use app\common\services\easyWechat\Client;
  4. use app\common\services\easyWechat\ContactWayClient;
  5. use app\common\services\easyWechat\Material;
  6. use Pimple\Container;
  7. use Pimple\ServiceProviderInterface;
  8. class ExternalClientProvider implements ServiceProviderInterface
  9. {
  10. /**
  11. * {@inheritdoc}.
  12. */
  13. public function register(Container $app)
  14. {
  15. $app['external_contact'] = function ($app) {
  16. return new Client($app);
  17. };
  18. $app['contact_way'] = function ($app) {
  19. return new ContactWayClient($app);
  20. };
  21. }
  22. }