<?php
namespace Slivki\Entity;
use Doctrine\Common\Collections\ArrayCollection;
class AntiTag extends Entity implements \JsonSerializable{
protected $tag;
protected $offers;
public function __construct() {
$this->offers = new ArrayCollection();
}
public function getTag() {
return $this->tag;
}
public function setTag($tag) {
$this->tag = $tag;
}
/**
* @return ArrayCollection
*/
public function getOffers() {
return $this->offers;
}
public function addOffer(Offer $offer) {
if (!$this->offers->contains($offer)) {
$this->offers->add($offer);
}
}
public function jsonSerialize(): array
{
return [
'ID' => $this->ID,
'tag' => $this->tag
];
}
}