mirror of
https://github.com/shlinkio/shlink.git
synced 2026-02-28 04:03:12 +08:00
23 lines
397 B
PHP
23 lines
397 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\Core\Options;
|
|
|
|
use function count;
|
|
|
|
final readonly class RobotsOptions
|
|
{
|
|
public function __construct(
|
|
public bool $allowAllShortUrls = false,
|
|
/** @var string[] */
|
|
public array $userAgents = [],
|
|
) {
|
|
}
|
|
|
|
public function hasUserAgents(): bool
|
|
{
|
|
return count($this->userAgents) > 0;
|
|
}
|
|
}
|