shlink/module/Core/src/Options/AppOptions.php
2020-01-01 21:13:09 +01:00

59 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Core\Options;
use Laminas\Stdlib\AbstractOptions;
use Shlinkio\Shlink\Common\Util\StringUtilsTrait;
use function sprintf;
class AppOptions extends AbstractOptions
{
use StringUtilsTrait;
private string $name = '';
private string $version = '1.0';
private ?string $disableTrackParam = null;
public function getName(): string
{
return $this->name;
}
protected function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getVersion(): string
{
return $this->version;
}
protected function setVersion(string $version): self
{
$this->version = $version;
return $this;
}
/**
*/
public function getDisableTrackParam(): ?string
{
return $this->disableTrackParam;
}
protected function setDisableTrackParam(?string $disableTrackParam): self
{
$this->disableTrackParam = $disableTrackParam;
return $this;
}
public function __toString(): string
{
return sprintf('%s:v%s', $this->name, $this->version);
}
}