Added support for legacy and new publishing of visits in RabbitMQ

This commit is contained in:
Alejandro Celaya
2022-07-25 12:08:22 +02:00
parent 53b937be63
commit 6ce2049935
9 changed files with 70 additions and 18 deletions

View File

@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Core\Options;
use Laminas\Stdlib\AbstractOptions;
class RabbitMqOptions extends AbstractOptions
{
protected $__strictMode__ = false; // phpcs:ignore
private bool $enabled = false;
/** @deprecated */
private bool $legacyVisitsPublishing = false;
public function isEnabled(): bool
{
return $this->enabled;
}
protected function setEnabled(bool $enabled): self
{
$this->enabled = $enabled;
return $this;
}
/** @deprecated */
public function legacyVisitsPublishing(): bool
{
return $this->legacyVisitsPublishing;
}
/** @deprecated */
protected function setLegacyVisitsPublishing(bool $legacyVisitsPublishing): self
{
$this->legacyVisitsPublishing = $legacyVisitsPublishing;
return $this;
}
}