香洲二院小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mini_xzey/app/Utils/Transfer/HisSoapClient/ClientFactory.php

25 lines
566 B

<?php
declare(strict_types=1);
namespace App\Utils\Transfer\HisSoapClient;
use App\Utils\Transfer\SoapTransferAbstract;
class ClientFactory
{
/**
* Get Client Transfer Class
* @param string $name
* @return SoapTransferAbstract
*/
public static function getClientTransfer(string $name): SoapTransferAbstract
{
$is_mock = config('hisservice.'. $name. '.is_mock');
return match ($is_mock) {
false => new ClientSoapTransfer($name),
true => new ClientMockSoapTransfer($name),
};
}
}