-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathAcsfCommandFactory.php
69 lines (63 loc) · 2.06 KB
/
AcsfCommandFactory.php
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
declare(strict_types=1);
namespace Acquia\Cli\Command\Acsf;
use Acquia\Cli\AcsfApi\AcsfClientService;
use Acquia\Cli\AcsfApi\AcsfCredentials;
use Acquia\Cli\Command\Api\ApiBaseCommand;
use Acquia\Cli\CommandFactoryInterface;
use Acquia\Cli\DataStore\AcquiaCliDatastore;
use Acquia\Cli\DataStore\CloudDataStore;
use Acquia\Cli\Helpers\LocalMachineHelper;
use Acquia\Cli\Helpers\SshHelper;
use Acquia\Cli\Helpers\TelemetryHelper;
use Psr\Log\LoggerInterface;
use SelfUpdate\SelfUpdateManager;
class AcsfCommandFactory implements CommandFactoryInterface
{
public function __construct(
private LocalMachineHelper $localMachineHelper,
private CloudDataStore $datastoreCloud,
private AcquiaCliDatastore $datastoreAcli,
private AcsfCredentials $cloudCredentials,
private TelemetryHelper $telemetryHelper,
private string $projectDir,
private AcsfClientService $cloudApiClientService,
private SshHelper $sshHelper,
private string $sshDir,
private LoggerInterface $logger,
private SelfUpdateManager $selfUpdateManager,
) {
}
public function createCommand(): ApiBaseCommand
{
return new ApiBaseCommand(
$this->localMachineHelper,
$this->datastoreCloud,
$this->datastoreAcli,
$this->cloudCredentials,
$this->telemetryHelper,
$this->projectDir,
$this->cloudApiClientService,
$this->sshHelper,
$this->sshDir,
$this->logger,
$this->selfUpdateManager,
);
}
public function createListCommand(): AcsfListCommand
{
return new AcsfListCommand(
$this->localMachineHelper,
$this->datastoreCloud,
$this->datastoreAcli,
$this->cloudCredentials,
$this->telemetryHelper,
$this->projectDir,
$this->cloudApiClientService,
$this->sshHelper,
$this->sshDir,
$this->logger,
$this->selfUpdateManager,
);
}
}