-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAppendExtraPathConfigOption.php
More file actions
33 lines (27 loc) · 1.04 KB
/
AppendExtraPathConfigOption.php
File metadata and controls
33 lines (27 loc) · 1.04 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
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Installer\Config\Option\UrlShortener;
use Shlinkio\Shlink\Installer\Config\Option\BaseConfigOption;
use Symfony\Component\Console\Style\StyleInterface;
/** @deprecated */
class AppendExtraPathConfigOption extends BaseConfigOption
{
public function getEnvVar(): string
{
return 'REDIRECT_APPEND_EXTRA_PATH';
}
public function ask(StyleInterface $io, array $currentOptions): bool
{
return $io->confirm(
// phpcs:disable
<<<FOO
Do you want Shlink to redirect short URLs as soon as the first segment of the path matches a short code, appending the rest to the long URL?
* {shortDomain}/{shortCode}/[...extraPath] -> {longUrl}/[...extraPath]
* https://example.com/abc123 -> https://www.twitter.com
* https://example.com/abc123/shlinkio -> https://www.twitter.com/shlinkio
FOO,
// phpcs:disable
false,
);
}
}