<?php
namespace Boldr\Shop\MolliePaymentMethodBundle\Payment;
use Boldr\Shop\ShopBundle\Payment\PaymentOptionInterface;
class MolliePaymentOption implements PaymentOptionInterface
{
private string $method;
private ?string $description;
private ?array $issuers;
private ?string $selectedIssuer = null;
private $image;
public function __construct(string $method, ?string $description = null, ?array $issuers, $image)
{
$this->method = $method;
$this->description = $description;
$this->issuers = $issuers;
$this->image = $image;
}
public function getMethod(): string { return $this->method; }
public function getDescription(): ?string { return $this->description; }
public function getIssuers(): ?array { return $this->issuers; }
public function getImage() { return $this->image; }
public function getSelectedIssuer(): ?string { return $this->selectedIssuer; }
public function setSelectedIssuer(?string $selectedIssuer): void { $this->selectedIssuer = $selectedIssuer; }
public function isEqual(PaymentOptionInterface $paymentOption): bool
{
return $paymentOption instanceof self && $paymentOption->getMethod() == $this->method;
}
}