-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathSmsapiComHttpService.php
More file actions
39 lines (32 loc) · 1.08 KB
/
Copy pathSmsapiComHttpService.php
File metadata and controls
39 lines (32 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
declare(strict_types=1);
namespace Smsapi\Client\Service;
use Smsapi\Client\Feature\Data\DataFactoryProvider;
use Smsapi\Client\Feature\Profile\ProfileFeature;
use Smsapi\Client\Feature\Profile\ProfileHttpFeature;
use Smsapi\Client\Feature\Profile\SmsapiPlProfileFeature;
use Smsapi\Client\Feature\Profile\SmsapiPlProfileHttpFeature;
use Smsapi\Client\Infrastructure\RequestExecutor\RequestExecutorFactory;
/**
* @internal
*/
class SmsapiComHttpService implements SmsapiComService
{
use HttpDefaultFeatures;
private $requestExecutorFactory;
private $dataFactoryProvider;
public function __construct(
RequestExecutorFactory $requestExecutorFactory,
DataFactoryProvider $dataFactoryProvider
) {
$this->requestExecutorFactory = $requestExecutorFactory;
$this->dataFactoryProvider = $dataFactoryProvider;
}
public function profileFeature(): ProfileFeature
{
return new ProfileHttpFeature(
$this->requestExecutorFactory->createRestRequestExecutor(),
$this->dataFactoryProvider
);
}
}