仓库初始化

This commit is contained in:
2025-08-13 10:43:56 +08:00
commit e8f9b46680
5180 changed files with 859303 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?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\Exception\ContainerException;
use Yansongda\Pay\Pay;
class EventServiceProvider implements ServiceProviderInterface
{
/**
* @param mixed $data
*
* @throws ContainerException
*/
public function register($data = null): void
{
if (class_exists(EventDispatcher::class)) {
Pay::set(EventDispatcherInterface::class, new EventDispatcher());
}
}
}