mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-03-25 23:03:10 +00:00
25 lines
625 B
PHP
25 lines
625 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Yansongda\Artful\Service;
|
|
|
|
use Yansongda\Artful\Artful;
|
|
use Yansongda\Artful\Contract\HttpClientFactoryInterface;
|
|
use Yansongda\Artful\Contract\ServiceProviderInterface;
|
|
use Yansongda\Artful\Exception\ContainerException;
|
|
use Yansongda\Artful\HttpClientFactory;
|
|
|
|
class HttpServiceProvider implements ServiceProviderInterface
|
|
{
|
|
/**
|
|
* @throws ContainerException
|
|
*/
|
|
public function register(mixed $data = null): void
|
|
{
|
|
$container = Artful::getContainer();
|
|
|
|
Artful::set(HttpClientFactoryInterface::class, new HttpClientFactory($container));
|
|
}
|
|
}
|