register('createOrder', AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256')); self::$authorizationReqRegistry->register('kfcOrder', AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256')); self::$authorizationReqRegistry->register('kfcOrder_0', AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256')); self::$authorizationReqRegistry->register('queryCinemaOrder', AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256')); self::$authorizationReqRegistry->register('queryKfcOrder', AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256')); self::$authorizationReqRegistry->register('queryOrder', AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256')); } /** * @var ClientParams */ private $clientParams; /** * TravelResourcesClientBuilder constructor. * @param ClientParams $clientParams */ public function __construct(ClientParams $clientParams) { $this->clientParams = $clientParams; } public function build() { return new TravelResourcesClient($this->clientParams); } /** * @param $config AppSdkConfig|array|AppSdkConfigProvider * @return TravelResourcesClientBuilder * @throws YopClientException */ public static function builder($config) { $appSdkConfigProvider = null; if ($config instanceof AppSdkConfigProvider) { $appSdkConfigProvider = $config; } else { $appSdkConfigProvider = new DefaultAppSdkConfigProvider($config); } $clientParams = ClientParamsSupport::generateClientParams($appSdkConfigProvider); $clientParams->setAuthorizationReqRegistry(self::$authorizationReqRegistry); return new TravelResourcesClientBuilder($clientParams); } } TravelResourcesClientBuilder::__init();