mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-25 12:38:10 +00:00
24 lines
595 B
PHP
24 lines
595 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Yansongda\Pay\Service;
|
|
|
|
use Symfony\Component\EventDispatcher\EventDispatcher;
|
|
use Yansongda\Pay\Contract\EventDispatcherInterface;
|
|
use Yansongda\Pay\Contract\ServiceProviderInterface;
|
|
use Yansongda\Pay\Pay;
|
|
|
|
class EventServiceProvider implements ServiceProviderInterface
|
|
{
|
|
/**
|
|
* @throws \Yansongda\Pay\Exception\ContainerException
|
|
*/
|
|
public function register($data = null): void
|
|
{
|
|
if (class_exists(EventDispatcher::class)) {
|
|
Pay::set(EventDispatcherInterface::class, new EventDispatcher());
|
|
}
|
|
}
|
|
}
|