JsbServiceProvider.php 518 B

123456789101112131415161718192021222324
  1. <?php
  2. declare(strict_types=1);
  3. namespace Yansongda\Pay\Service;
  4. use Yansongda\Artful\Contract\ServiceProviderInterface;
  5. use Yansongda\Artful\Exception\ContainerException;
  6. use Yansongda\Pay\Pay;
  7. use Yansongda\Pay\Provider\Jsb;
  8. class JsbServiceProvider implements ServiceProviderInterface
  9. {
  10. /**
  11. * @throws ContainerException
  12. */
  13. public function register(mixed $data = null): void
  14. {
  15. $service = new Jsb();
  16. Pay::set(Jsb::class, $service);
  17. Pay::set('jsb', $service);
  18. }
  19. }