- 框架初始化
 - 安装插件
 - 修复PHP8.4报错
This commit is contained in:
2025-04-19 17:21:20 +08:00
commit c6a4e1f5f6
5306 changed files with 967782 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
class ApiRequested extends Event
{
}

View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
class ApiRequesting extends Event
{
}

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
use Psr\Http\Message\ServerRequestInterface;
use Yansongda\Pay\Rocket;
class CallbackReceived extends Event
{
public string $provider;
public ?array $params = null;
/**
* @var null|array|ServerRequestInterface
*/
public $contents;
/**
* @param null|array|ServerRequestInterface $contents
*/
public function __construct(string $provider, $contents, ?array $params = null, ?Rocket $rocket = null)
{
$this->provider = $provider;
$this->contents = $contents;
$this->params = $params;
parent::__construct($rocket);
}
}

View File

@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
use Yansongda\Pay\Rocket;
class Event
{
public ?Rocket $rocket = null;
public function __construct(?Rocket $rocket = null)
{
$this->rocket = $rocket;
}
}

View File

@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
use Yansongda\Pay\Rocket;
class MethodCalled extends Event
{
public string $provider;
public string $name;
public array $params;
public function __construct(string $provider, ?string $name, ?array $params, ?Rocket $rocket = null)
{
$this->provider = $provider;
$this->name = $name;
$this->params = $params;
parent::__construct($rocket);
}
}

View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
class PayFinish extends Event
{
}

View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
use Yansongda\Pay\Contract\PluginInterface;
use Yansongda\Pay\Rocket;
class PayStarted extends Event
{
/**
* @var PluginInterface[]
*/
public array $plugins;
public array $params;
public function __construct(array $plugins, ?array $params, ?Rocket $rocket = null)
{
$this->plugins = $plugins;
$this->params = $params;
parent::__construct($rocket);
}
}