shlink/module/Core/src/Options/AppOptions.php

60 lines
1.2 KiB
PHP
Raw Normal View History

2016-08-07 15:44:33 +03:00
<?php
2019-10-05 18:26:10 +03:00
2017-10-12 11:13:20 +03:00
declare(strict_types=1);
2016-08-07 15:44:33 +03:00
namespace Shlinkio\Shlink\Core\Options;
use Shlinkio\Shlink\Common\Util\StringUtilsTrait;
use Zend\Stdlib\AbstractOptions;
use function sprintf;
2016-08-07 15:44:33 +03:00
class AppOptions extends AbstractOptions
{
use StringUtilsTrait;
2019-12-30 00:27:00 +03:00
private string $name = '';
private string $version = '1.0';
private ?string $disableTrackParam = null;
2016-08-07 15:44:33 +03:00
2018-12-06 23:05:11 +03:00
public function getName(): string
2016-08-07 15:44:33 +03:00
{
return $this->name;
}
2018-12-06 23:05:11 +03:00
protected function setName(string $name): self
2016-08-07 15:44:33 +03:00
{
$this->name = $name;
return $this;
}
2018-12-06 23:05:11 +03:00
public function getVersion(): string
2016-08-07 15:44:33 +03:00
{
return $this->version;
}
2018-12-06 23:05:11 +03:00
protected function setVersion(string $version): self
2016-08-07 15:44:33 +03:00
{
$this->version = $version;
return $this;
}
/**
*/
2018-12-06 23:05:11 +03:00
public function getDisableTrackParam(): ?string
{
return $this->disableTrackParam;
}
2018-12-06 23:05:11 +03:00
protected function setDisableTrackParam(?string $disableTrackParam): self
{
$this->disableTrackParam = $disableTrackParam;
return $this;
}
2018-12-06 23:05:11 +03:00
public function __toString(): string
2016-08-07 15:44:33 +03:00
{
return sprintf('%s:v%s', $this->name, $this->version);
}
}