50 lines
891 B
PHP
50 lines
891 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace KupShop\ComponentsBundle\Attributes;
|
|
|
|
#[\Attribute(\Attribute::TARGET_CLASS)]
|
|
class Version
|
|
{
|
|
protected bool $isLatest = false;
|
|
|
|
public function __construct(
|
|
protected int $versionFrom,
|
|
protected bool $newTemplate = false,
|
|
protected ?bool $newJs = false,
|
|
protected ?bool $newCss = false,
|
|
) {
|
|
}
|
|
|
|
public function getVersionFrom(): int
|
|
{
|
|
return $this->versionFrom;
|
|
}
|
|
|
|
public function setIsLatest()
|
|
{
|
|
$this->isLatest = true;
|
|
}
|
|
|
|
public function getIsLatest(): bool
|
|
{
|
|
return $this->isLatest;
|
|
}
|
|
|
|
public function isNewTemplate(): bool
|
|
{
|
|
return $this->newTemplate;
|
|
}
|
|
|
|
public function isNewJs(): ?bool
|
|
{
|
|
return $this->newJs;
|
|
}
|
|
|
|
public function isNewCss(): ?bool
|
|
{
|
|
return $this->newCss;
|
|
}
|
|
}
|