mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-07 09:17:35 +00:00
41 lines
945 B
PHP
41 lines
945 B
PHP
<?php
|
|
/**
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
declare(strict_types=1);
|
|
|
|
namespace Magento\MessageQueue\Model;
|
|
|
|
use Magento\Framework\MessageQueue\PoisonPill\PoisonPillCompareInterface;
|
|
use Magento\Framework\MessageQueue\PoisonPill\PoisonPillReadInterface;
|
|
|
|
/**
|
|
* Poison pill compare
|
|
*/
|
|
class PoisonPillCompare implements PoisonPillCompareInterface
|
|
{
|
|
/**
|
|
* @var PoisonPillReadInterface
|
|
*/
|
|
private $poisonPillRead;
|
|
|
|
/**
|
|
* PoisonPillCompare constructor.
|
|
* @param PoisonPillReadInterface $poisonPillRead
|
|
*/
|
|
public function __construct(
|
|
PoisonPillReadInterface $poisonPillRead
|
|
) {
|
|
$this->poisonPillRead = $poisonPillRead;
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function isLatestVersion(string $poisonPillVersion): bool
|
|
{
|
|
return $poisonPillVersion === $this->poisonPillRead->getLatestVersion();
|
|
}
|
|
}
|