forked from shlinkio/shlink-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstallCommand.php
More file actions
27 lines (21 loc) · 849 Bytes
/
InstallCommand.php
File metadata and controls
27 lines (21 loc) · 849 Bytes
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
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Installer\Command;
use Shlinkio\Shlink\Installer\Service\InstallationRunnerInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Style\SymfonyStyle;
#[AsCommand(InstallCommand::NAME, 'Guides you through the installation process, to get Shlink up and running')]
class InstallCommand extends Command
{
public const string NAME = 'install';
public function __construct(private readonly InstallationRunnerInterface $installationRunner)
{
parent::__construct();
}
public function __invoke(SymfonyStyle $io): int
{
$initCommand = $this->getApplication()?->find(InitCommand::NAME);
return $this->installationRunner->runInstallation($io, $initCommand);
}
}