<?php
namespace App\CasinoBundle\Entity;
use App\CasinoBundle\Enum\SiteTypeEnum;
use App\CmsBundle\Entity\LogInterface;
use App\CmsBundle\Entity\LogTrait;
use App\CmsBundle\Enum\LogActionEnum;
use App\ProfileBundle\Entity\User;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use App\CmsBundle\Entity\Site;
use App\CmsBundle\Entity\TimeStampedTrait;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Casino
*
* @ORM\Table(
* name="casino",
* indexes={
* @ORM\Index(name="score_index", columns={"score"}),
* @ORM\Index(name="site_type_index", columns={"site_type"})
* },
* uniqueConstraints={
* @ORM\UniqueConstraint(name="domain_uindex", columns={"domain"}),
* @ORM\UniqueConstraint(name="casino_name_uindex", columns={"name"})
* }
* )
* @ORM\Entity(repositoryClass="App\CasinoBundle\Repository\CasinoRepository")
* @ORM\HasLifecycleCallbacks()
* @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="one_day")
*/
class Casino implements AliasableInterface, LogInterface
{
use TimeStampedTrait, AliasTrait, SlotcatalogIdTrait, LogTrait;
/**
*
*/
public const MAX_SCORE = 168;
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="string", length=255)
*/
private $domain;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $score;
/**
* @ORM\Column(name="show_terms", type="boolean", nullable=true)
*/
private $showTerms;
/**
* @var bool|null
*
* @ORM\Column(
* name="reset_score",
* type="boolean",
* nullable=true
* )
*/
private ?bool $resetScore;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $newScore;
/**
* @ORM\Column(type="float", nullable=true)
* @Assert\Range(
* min = 0.0,
* max = 5.0,
* notInRangeMessage = "The value must be between {{ min }} and {{ max }}.",
* )
*/
private $generosityRank;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $siteType;
/**
* @var float
*
* @ORM\Column(name="brand_score", type="float", nullable=false, options={"default" = 0})
*/
private float $brandScore = 0.0;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Game", fetch="EXTRA_LAZY", inversedBy="casinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_game",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="game_id", referencedColumnName="id")
* }
* )
*/
protected $games;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\BonusType", inversedBy="casinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_bonus_type",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="bonus_type_id", referencedColumnName="id")
* }
* )
*/
protected $bonusTypes;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Software", inversedBy="casinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_software",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="software_id", referencedColumnName="id")
* }
* )
*/
protected $softwares;
/**
* @ORM\ManyToMany(
* targetEntity="App\CmsBundle\Entity\Site",
* fetch="EXTRA_LAZY",
* cascade={"persist"}
* )
* @ORM\JoinTable(
* name="casino_site",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="site_id", referencedColumnName="id")
* }
* )
*/
protected Collection $sites;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Language", inversedBy="casinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_language",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="language_id", referencedColumnName="id")
* }
* )
*/
protected $languages;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Language", inversedBy="chatSupportCasinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_chat_support_language",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="language_id", referencedColumnName="id")
* }
* )
*/
protected $chatSupportLanguages;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Language", inversedBy="emailSupportCasinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_email_support_language",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="language_id", referencedColumnName="id")
* }
* )
*/
protected $emailSupportLanguages;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Language", inversedBy="phoneSupportCasinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_phone_support_language",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="language_id", referencedColumnName="id")
* }
* )
*/
protected $phoneSupportLanguages;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Country", inversedBy="allowedCasinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_allowed_country",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="country_id", referencedColumnName="id")
* }
* )
*/
protected $allowedCountries;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Country", inversedBy="restrictedCasinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_restricted_country",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="country_id", referencedColumnName="id")
* }
* )
*/
public $restrictedCountries;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Country", inversedBy="restrictedCasinosFact", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_restricted_country_fact",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="country_id", referencedColumnName="id")
* }
* )
*/
public $restrictedCountriesFact;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Country", inversedBy="jurisdictionCasinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_jurisdiction",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="country_id", referencedColumnName="id")
* }
* )
*/
protected $jurisdictions;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Country", inversedBy="brandRegistrationCasinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_brand_registration",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="country_id", referencedColumnName="id")
* }
* )
*/
protected $brandRegistration;
/**
* @ORM\ManyToMany (
* targetEntity="App\CasinoBundle\Entity\CasinoCategory",
* inversedBy="casinos",
* cascade={"persist"},
* fetch="EXTRA_LAZY"
* )
* @ORM\JoinTable(
* name="casino_casino_categories",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="casino_category_id", referencedColumnName="id")
* }
* )
*/
private $casinoCategories;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Country", inversedBy="serverLocationCasinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_server_location",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="country_id", referencedColumnName="id")
* }
* )
*/
protected $serverLocation;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\Visit", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
*/
protected $visits;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\ProsAndCons", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
*/
protected $prosAndCons;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\Traffic", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
* @ORM\OrderBy({"date" = "DESC"})
*/
protected $traffic;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Keyword", inversedBy="casinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_keyword",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="keyword_id", referencedColumnName="id")
* }
* )
*/
protected $keywords;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\CasinoType", inversedBy="casinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_casino_type",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="casino_type_id", referencedColumnName="id")
* }
* )
*/
protected $casinoTypes;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Currency", inversedBy="casinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_currency",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="currency_id", referencedColumnName="id")
* }
* )
*/
protected $currencies;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\PaymentMethod", inversedBy="casinosWithDepositMethods", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_deposit_methods",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="deposit_method_id", referencedColumnName="id")
* }
* )
* @ORM\OrderBy({"position" = "ASC"})
*/
protected $depositMethods;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\PaymentMethod", inversedBy="casinosWithWithdrawalMethods", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_withdrawal_methods",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="withdrawal_method_id", referencedColumnName="id")
* }
* )
* @ORM\OrderBy({"position" = "ASC"})
*/
protected $withdrawalMethods;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\CasinoLicence", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
*/
protected $casinoLicences;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\CasinoOverview", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
*/
protected $casinoOverview;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\CasinoGeoScore", mappedBy="casino", cascade={"persist","remove"}, orphanRemoval=true)
*/
protected $geoScores;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\SupervisoryAuthority", inversedBy="casinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_supervisory_authority",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="supervisory_authority_id", referencedColumnName="id")
* }
* )
*/
protected $supervisoryAuthorities;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Owner", inversedBy="casinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_owner",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="owner_id", referencedColumnName="id")
* }
* )
*/
protected $owners;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\SocialNetwork", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
*/
private $socialNetworks;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\Alias", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
*/
private Collection $aliases;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\Url", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
*/
private $urls;
/**
* @ORM\OneToMany(
* targetEntity="App\CasinoBundle\Entity\NewBonus",
* mappedBy="casino",
* cascade={"persist"},
* orphanRemoval=true,
* fetch="EXTRA_LAZY"
* )
* @ORM\OrderBy(
* {"score" = "DESC"}
* )
*/
private $newBonuses;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\Review", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
*/
private $reviews;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\Logo", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
*/
private $logos;
/**
* @ORM\OneToOne(targetEntity="App\CasinoBundle\Entity\Info", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
*/
private $info;
/**
* @ORM\OneToOne(targetEntity="App\CasinoBundle\Entity\Trustpilot", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
*/
private $trustpilot;
/**
* @ORM\OneToOne(targetEntity="App\CasinoBundle\Entity\SeoStat", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
*/
private $seostat;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\SlotCasinoGeo", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
*/
private $slotCasinoGeo;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\CasinoScreenshot", mappedBy="casino", cascade={"persist"}, orphanRemoval=true)
* @ORM\OrderBy({"position" = "ASC"})
*/
private $casinoScreenshots;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $galleryHash;
/**
* @ORM\ManyToMany(targetEntity="App\CasinoBundle\Entity\Slot", inversedBy="casinos", cascade={"persist"})
* @ORM\JoinTable(
* name="casino_slot",
* joinColumns={
* @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="slot_id", referencedColumnName="id")
* }
* )
*/
protected $slots;
/**
* @var bool
*
* @ORM\Column(
* name="invert_country_from_allowed_1",
* type="boolean",
* nullable=true
* )
*/
private ?bool $invertCountryFromAllowed1;
/**
* @var bool
*
* @ORM\Column(
* name="invert_country_from_allowed_2",
* type="boolean",
* nullable=true
* )
*/
private ?bool $invertCountryFromAllowed2;
/**
* @var bool
*
* @ORM\Column(
* name="invert_country_from_restricted",
* type="boolean",
* nullable=true
* )
*/
private ?bool $invertCountryFromRestricted;
/**
* @var bool
*
* @ORM\Column(
* name="copy_country_from_restricted",
* type="boolean",
* nullable=true
* )
*/
private ?bool $copyCountryFromRestricted;
/**
* @var int|null
*
* @ORM\Column(
* name="copy_restricted_countries_from_casino",
* type="integer",
* nullable=true
* )
*/
private ?int $copyRestrictedCountriesFromCasino;
/**
* @var string|null
*
* @ORM\Column(
* name="game_types",
* type="string",
* nullable=true
* )
*/
private ?string $gameTypes;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\UserReview", mappedBy="casino")
*/
private Collection $userReviews;
/**
* @ORM\ManyToMany(
* targetEntity="App\ProfileBundle\Entity\User",
* mappedBy="casinos",
* cascade={"persist"}
* )
*/
private Collection $users;
/**
*
*/
public function __construct()
{
$this->score = 0;
$this->games = new ArrayCollection();
$this->bonusTypes = new ArrayCollection();
$this->softwares = new ArrayCollection();
$this->languages = new ArrayCollection();
$this->geoScores = new ArrayCollection();
$this->chatSupportLanguages = new ArrayCollection();
$this->emailSupportLanguages = new ArrayCollection();
$this->phoneSupportLanguages = new ArrayCollection();
$this->allowedCountries = new ArrayCollection();
$this->restrictedCountries = new ArrayCollection();
$this->restrictedCountriesFact = new ArrayCollection();
$this->currencies = new ArrayCollection();
$this->depositMethods = new ArrayCollection();
$this->withdrawalMethods = new ArrayCollection();
$this->casinoLicences = new ArrayCollection();
$this->supervisoryAuthorities = new ArrayCollection();
$this->owners = new ArrayCollection();
$this->socialNetworks = new ArrayCollection();
$this->jurisdictions = new ArrayCollection();
$this->serverLocation = new ArrayCollection();
$this->brandRegistration = new ArrayCollection();
$this->casinoTypes = new ArrayCollection();
$this->urls = new ArrayCollection();
$this->newBonuses = new ArrayCollection();
$this->reviews = new ArrayCollection();
$this->logos = new ArrayCollection();
$this->visits = new ArrayCollection();
$this->prosAndCons = new ArrayCollection();
$this->traffic = new ArrayCollection();
$this->keywords = new ArrayCollection();
$this->aliases = new ArrayCollection();
$this->slotCasinoGeo = new ArrayCollection();
$this->info = (new Info())->setCasino($this);
$this->siteType = SiteTypeEnum::CASINO;
$this->casinoScreenshots = new ArrayCollection();
$this->slots = new ArrayCollection();
$this->sites = new ArrayCollection();
$this->casinoCategories = new ArrayCollection();
$this->copyCountryFromRestricted = null;
$this->copyRestrictedCountriesFromCasino = null;
$this->gameTypes = null;
}
/**
* @return string
*/
public function __toString(): string
{
return $this->domain;
}
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @return string
*/
public function getSlug(): string
{
return $this->getDomain();
}
/**
* @return Info
*/
public function getInfo(): Info
{
return ($this->info)
? $this->info
: (new Info())->setCasino($this);
}
/**
* @param Info $info
* @return $this
*/
public function setInfo(Info $info): self
{
$this->info = $info;
$info->setCasino($this);
return $this;
}
/**
* @return Trustpilot
*/
public function getTrustpilot(): Trustpilot
{
if (is_null($this->trustpilot)) {
$this->trustpilot = (new Trustpilot())->setCasino($this);
}
return $this->trustpilot;
}
/**
* @param Trustpilot $trustpilot
* @return $this
*/
public function setTrustpilot(Trustpilot $trustpilot): self
{
$trustpilot->setCasino($this);
$this->trustpilot = $trustpilot;
return $this;
}
/**
* @return SeoStat
*/
public function getSeoStat(): SeoStat
{
if (is_null($this->seostat)) {
$this->seostat = (new SeoStat())->setCasino($this);
}
return $this->seostat;
}
/**
* @param SeoStat $seostat
* @return $this
*/
public function setSeoStat(SeoStat $seostat): self
{
$seostat->setCasino($this);
$this->seostat = $seostat;
return $this;
}
/**
* @return string|null
*/
public function getName(): ?string
{
return $this->name;
}
/**
* @param string $name
* @return $this
*/
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
/**
* @return string|null
*/
public function getDomain(): ?string
{
return $this->domain;
}
/**
* @param string $domain
* @return $this
*/
public function setDomain(string $domain): self
{
$this->domain = $domain;
return $this;
}
/**
* @return Collection|Game[]
*/
public function getGames(): Collection
{
return $this->games;
}
/**
* @return int
*/
public function getGamesCount(): int
{
return $this->games->count();
}
/**
* @param Game $game
* @return $this
*/
public function addGame(Game $game): self
{
if (!$this->games->contains($game)) {
$this->games[] = $game;
$game->addCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'game', $game);
}
return $this;
}
/**
* @param Game $game
* @return $this
*/
public function removeGame(Game $game): self
{
if ($this->games->contains($game)) {
$this->games->removeElement($game);
$game->removeCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'game', $game);
}
return $this;
}
/**
* @return Collection|CasinoGeoScore[]
*/
public function getCasinoGeoScores(): Collection
{
return $this->geoScores;
}
/**
* @param CasinoGeoScore $geoScore
* @return $this
*/
public function addCasinoGeoScore(CasinoGeoScore $geoScore): self
{
if (!$this->geoScores->contains($geoScore)) {
$this->geoScores[] = $geoScore;
$geoScore->setCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'casinoGeoScore', $geoScore);
}
return $this;
}
/**
* @param CasinoGeoScore $geoScore
* @return $this
*/
public function removeCasinoGeoScore(CasinoGeoScore $geoScore): self
{
if ($this->geoScores->contains($geoScore)) {
$this->geoScores->removeElement($geoScore);
$geoScore->setCasino(null);
$this->addCollectionLog(LogActionEnum::REMOVE, 'casinoGeoScore', $geoScore);
}
return $this;
}
/**
* @return Collection|BonusType[]
*/
public function getBonusTypes(): Collection
{
return $this->bonusTypes;
}
/**
* @param BonusType $bonusType
* @return $this
*/
public function addBonusType(BonusType $bonusType): self
{
if (!$this->bonusTypes->contains($bonusType)) {
$this->bonusTypes[] = $bonusType;
$bonusType->addCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'bonusType', $bonusType);
}
return $this;
}
/**
* @param BonusType $bonusType
* @return $this
*/
public function removeBonusType(BonusType $bonusType): self
{
if ($this->bonusTypes->contains($bonusType)) {
$this->bonusTypes->removeElement($bonusType);
$bonusType->removeCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'bonusType', $bonusType);
}
return $this;
}
/**
* @return Collection|Software[]
*/
public function getSoftwares(): Collection
{
return $this->softwares;
}
/**
* @param Software $software
* @return $this
*/
public function addSoftware(Software $software): self
{
if (!$this->softwares->contains($software)) {
$this->softwares[] = $software;
$software->addCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'software', $software);
}
return $this;
}
/**
* @param Software $software
* @return $this
*/
public function removeSoftware(Software $software): self
{
if ($this->softwares->contains($software)) {
$this->softwares->removeElement($software);
$software->removeCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'software', $software);
}
return $this;
}
/**
* @return Collection|Language[]
*/
public function getLanguages(): Collection
{
return $this->languages;
}
/**
* @param Language $language
* @return $this
*/
public function addLanguage(Language $language): self
{
if (!$this->languages->contains($language)) {
$this->languages[] = $language;
$language->addCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'language', $language);
}
return $this;
}
/**
* @param Language $language
* @return $this
*/
public function removeLanguage(Language $language): self
{
if ($this->languages->contains($language)) {
$this->languages->removeElement($language);
$language->removeCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'language', $language);
}
return $this;
}
/**
* @return Collection|Language[]
*/
public function getChatSupportLanguages(): Collection
{
if (!$this->chatSupportLanguages) $this->chatSupportLanguages = new ArrayCollection();
return $this->chatSupportLanguages;
}
/**
* @param Language $language
* @return $this
*/
public function addChatSupportLanguage(Language $language): self
{
if (!$this->chatSupportLanguages->contains($language)) {
$this->chatSupportLanguages[] = $language;
$language->addCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'chatSupportLanguage', $language);
}
return $this;
}
/**
* @param Language $language
* @return $this
*/
public function removeChatSupportLanguage(Language $language): self
{
if ($this->chatSupportLanguages->contains($language)) {
$this->chatSupportLanguages->removeElement($language);
$language->removeCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'chatSupportLanguage', $language);
}
return $this;
}
/**
* @return Collection|Language[]
*/
public function getPhoneSupportLanguages(): Collection
{
if (!$this->phoneSupportLanguages) $this->phoneSupportLanguages = new ArrayCollection();
return $this->phoneSupportLanguages;
}
/**
* @param Language $language
* @return $this
*/
public function addPhoneSupportLanguage(Language $language): self
{
if (!$this->phoneSupportLanguages->contains($language)) {
$this->phoneSupportLanguages[] = $language;
$language->addCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'phoneSupportLanguage', $language);
}
return $this;
}
/**
* @param Language $language
* @return $this
*/
public function removePhoneSupportLanguage(Language $language): self
{
if ($this->phoneSupportLanguages->contains($language)) {
$this->phoneSupportLanguages->removeElement($language);
$language->removeCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'phoneSupportLanguage', $language);
}
return $this;
}
/**
* @return Collection|Language[]
*/
public function getEmailSupportLanguages(): Collection
{
if (!$this->emailSupportLanguages) $this->emailSupportLanguages = new ArrayCollection();
return $this->emailSupportLanguages;
}
/**
* @param Language $language
* @return $this
*/
public function addEmailSupportLanguage(Language $language): self
{
if (!$this->emailSupportLanguages->contains($language)) {
$this->emailSupportLanguages[] = $language;
$language->addCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'emailSupportLanguage', $language);
}
return $this;
}
/**
* @param Language $language
* @return $this
*/
public function removeEmailSupportLanguage(Language $language): self
{
if ($this->emailSupportLanguages->contains($language)) {
$this->emailSupportLanguages->removeElement($language);
$language->removeCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'emailSupportLanguage', $language);
}
return $this;
}
/**
* @return Collection|Country[]
*/
public function getAllowedCountries(): Collection
{
return $this->allowedCountries;
}
/**
* @param Country $country
* @return $this
*/
public function addAllowedCountry(Country $country): self
{
if (!$this->allowedCountries->contains($country)) {
$this->allowedCountries[] = $country;
$country->addAllowedCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'allowedCountry', $country);
}
return $this;
}
/**
* @param Country $country
* @return $this
*/
public function removeAllowedCountry(Country $country): self
{
if ($this->allowedCountries->contains($country)) {
$this->allowedCountries->removeElement($country);
$country->removeAllowedCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'allowedCountry', $country);
}
return $this;
}
/**
* @return Collection|Country[]
*/
public function getRestrictedCountries(): Collection
{
return $this->restrictedCountries;
}
/**
* @param Country $country
* @return $this
*/
public function addRestrictedCountry(Country $country): self
{
if (!$this->restrictedCountries->contains($country)) {
$this->restrictedCountries[] = $country;
$country->addRestrictedCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'restrictedCountry', $country);
}
return $this;
}
/**
* @param Country $country
* @return $this
*/
public function removeRestrictedCountry(Country $country): self
{
if ($this->restrictedCountries->contains($country)) {
$this->restrictedCountries->removeElement($country);
$country->removeRestrictedCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'restrictedCountry', $country);
}
return $this;
}
/**
* @return Collection|Country[]
*/
public function getRestrictedCountriesFact(): Collection
{
if (is_null($this->restrictedCountriesFact)) $this->restrictedCountriesFact = new ArrayCollection();
return $this->restrictedCountriesFact;
}
/**
* @return string[]
*/
public function getRestrictedCountriesFactAlpha2(): array
{
return array_map(function ($country) {
return $country->getAlpha2();
}, $this->restrictedCountriesFact->toArray());
}
/**
* @param Country $country
* @return $this
*/
public function addRestrictedCountryFact(Country $country): self
{
if (!$this->getRestrictedCountriesFact()->contains($country)) {
$this->restrictedCountriesFact[] = $country;
$country->addRestrictedCasinoFact($this);
$this->addCollectionLog(LogActionEnum::ADD, 'restrictedCountryFact', $country);
}
return $this;
}
/**
* @param Country $country
* @return $this
*/
public function removeRestrictedCountryFact(Country $country): self
{
if ($this->getRestrictedCountriesFact()->contains($country)) {
$this->restrictedCountriesFact->removeElement($country);
$country->removeRestrictedCasinoFact($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'restrictedCountryFact', $country);
}
return $this;
}
/**
* @return Collection|Country[]
*/
public function getJurisdictions(): Collection
{
return $this->jurisdictions;
}
/**
* @param Country $country
* @return $this
*/
public function addJurisdiction(Country $country): self
{
if (!$this->jurisdictions->contains($country)) {
$this->jurisdictions[] = $country;
$country->addJurisdictionCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'jurisdiction', $country);
}
return $this;
}
/**
* @param Country $country
* @return $this
*/
public function removeJurisdiction(Country $country): self
{
if ($this->jurisdictions->contains($country)) {
$this->jurisdictions->removeElement($country);
$country->removeJurisdictionCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'jurisdiction', $country);
}
return $this;
}
/**
* @return Collection|Country[]
*/
public function getServerLocation(): Collection
{
if (!$this->serverLocation) $this->serverLocation = new ArrayCollection();
return $this->serverLocation;
}
/**
* @param Country $country
* @return $this
*/
public function addServerLocation(Country $country): self
{
if (!$this->serverLocation->contains($country)) {
$this->serverLocation[] = $country;
$country->addServerLocationCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'serverLocation', $country);
}
return $this;
}
/**
* @param Country $country
* @return $this
*/
public function removeServerLocation(Country $country): self
{
if ($this->serverLocation->contains($country)) {
$this->serverLocation->removeElement($country);
$country->removeServerLocationCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'serverLocation', $country);
}
return $this;
}
/**
* @return Collection|Country[]
*/
public function getBrandRegistration(): Collection
{
if (!$this->brandRegistration) $this->brandRegistration = new ArrayCollection();
return $this->brandRegistration;
}
/**
* @param Country $country
* @return $this
*/
public function addBrandRegistration(Country $country): self
{
$this->addCollectionLog(LogActionEnum::ADD, 'brandRegistration', $country);
if (!$this->brandRegistration->contains($country)) {
$this->brandRegistration[] = $country;
$country->addBrandRegistrationCasino($this);
}
return $this;
}
/**
* @param Country $country
* @return $this
*/
public function removeBrandRegistration(Country $country): self
{
$this->addCollectionLog(LogActionEnum::REMOVE, 'brandRegistration', $country);
if ($this->brandRegistration->contains($country)) {
$this->brandRegistration->removeElement($country);
$country->removeBrandRegistrationCasino($this);
}
return $this;
}
/**
* @return Collection|CasinoType[]
*/
public function getCasinoTypes(): Collection
{
return $this->casinoTypes;
}
/**
* @param CasinoType $casinoType
* @return $this
*/
public function addCasinoType(CasinoType $casinoType): self
{
if (!$this->casinoTypes->contains($casinoType)) {
$this->casinoTypes[] = $casinoType;
$casinoType->addCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'casinoType', $casinoType);
}
return $this;
}
/**
* @param CasinoType $casinoType
* @return $this
*/
public function removeCasinoType(CasinoType $casinoType): self
{
if ($this->casinoTypes->contains($casinoType)) {
$this->casinoTypes->removeElement($casinoType);
$casinoType->removeCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'casinoType', $casinoType);
}
return $this;
}
/**
* @return Collection|Currency[]
*/
public function getCurrencies(): Collection
{
return $this->currencies;
}
/**
* @param Currency $currency
* @return $this
*/
public function addCurrency(Currency $currency): self
{
if (!$this->currencies->contains($currency)) {
$this->currencies[] = $currency;
$currency->addCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'currency', $currency);
}
return $this;
}
/**
* @param Currency $currency
* @return $this
*/
public function removeCurrency(Currency $currency): self
{
if ($this->currencies->contains($currency)) {
$this->currencies->removeElement($currency);
$currency->removeCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'currency', $currency);
}
return $this;
}
/**
* @return Collection|PaymentMethod[]
*/
public function getDepositMethods(): Collection
{
return $this->depositMethods;
}
/**
* @param PaymentMethod $depositMethod
* @return $this
*/
public function addDepositMethod(PaymentMethod $depositMethod): self
{
if (!$this->depositMethods->contains($depositMethod)) {
$this->depositMethods[] = $depositMethod;
$depositMethod->addCasinoWithDepositMethod($this);
$this->addCollectionLog(LogActionEnum::ADD, 'depositMethod', $depositMethod);
}
return $this;
}
/**
* @param PaymentMethod $depositMethod
* @return $this
*/
public function removeDepositMethod(PaymentMethod $depositMethod): self
{
if ($this->depositMethods->contains($depositMethod)) {
$this->depositMethods->removeElement($depositMethod);
$depositMethod->removeCasinoWithDepositMethod($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'depositMethod', $depositMethod);
}
return $this;
}
/**
* @return Collection|PaymentMethod[]
*/
public function getWithdrawalMethods(): Collection
{
return $this->withdrawalMethods;
}
/**
* @param PaymentMethod $withdrawalMethod
* @return $this
*/
public function addWithdrawalMethod(PaymentMethod $withdrawalMethod): self
{
if (!$this->withdrawalMethods->contains($withdrawalMethod)) {
$this->withdrawalMethods[] = $withdrawalMethod;
$withdrawalMethod->addCasinoWithWithdrawalMethod($this);
$this->addCollectionLog(LogActionEnum::ADD, 'withdrawalMethod', $withdrawalMethod);
}
return $this;
}
/**
* @param PaymentMethod $withdrawalMethod
* @return $this
*/
public function removeWithdrawalMethod(PaymentMethod $withdrawalMethod): self
{
if ($this->withdrawalMethods->contains($withdrawalMethod)) {
$this->withdrawalMethods->removeElement($withdrawalMethod);
$withdrawalMethod->removeCasinoWithWithdrawalMethod($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'withdrawalMethod', $withdrawalMethod);
}
return $this;
}
/**
* @return Collection|CasinoLicence[]
*/
public function getCasinoLicences(): Collection
{
if (!$this->casinoLicences) $this->casinoLicences = new ArrayCollection();
return $this->casinoLicences;
}
/**
* @param CasinoLicence $casinoLicence
* @return $this
*/
public function addCasinoLicence(CasinoLicence $casinoLicence): self
{
if (!$this->casinoLicences->contains($casinoLicence)) {
$this->casinoLicences[] = $casinoLicence;
$casinoLicence->setCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'casinoLicence', $casinoLicence);
}
return $this;
}
/**
* @param CasinoLicence $casinoLicence
* @return $this
*/
public function removeCasinoLicence(CasinoLicence $casinoLicence): self
{
if ($this->casinoLicences->contains($casinoLicence)) {
$this->casinoLicences->removeElement($casinoLicence);
$casinoLicence->setCasino(null);
$this->addCollectionLog(LogActionEnum::REMOVE, 'casinoLicence', $casinoLicence);
}
return $this;
}
/**
* @return Collection|Owner[]
*/
public function getOwners(): Collection
{
if (!$this->owners) $this->owners = new ArrayCollection();
return $this->owners;
}
/**
* @param Owner $owner
* @return $this
*/
public function addOwner(Owner $owner): self
{
if (!$this->owners->contains($owner)) {
$this->owners[] = $owner;
$owner->addCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'owner', $owner);
}
return $this;
}
/**
* @param Owner $owner
* @return $this
*/
public function removeOwner(Owner $owner): self
{
if ($this->owners->contains($owner)) {
$this->owners->removeElement($owner);
$owner->removeCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'owner', $owner);
}
return $this;
}
/**
* @return Collection|SupervisoryAuthority[]
*/
public function getSupervisoryAuthorities(): Collection
{
if (!$this->supervisoryAuthorities) $this->supervisoryAuthorities = new ArrayCollection();
return $this->supervisoryAuthorities;
}
/**
* @param SupervisoryAuthority $supervisoryAuthority
* @return $this
*/
public function addSupervisoryAuthority(SupervisoryAuthority $supervisoryAuthority): self
{
if (!$this->supervisoryAuthorities->contains($supervisoryAuthority)) {
$this->supervisoryAuthorities[] = $supervisoryAuthority;
$supervisoryAuthority->addCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'supervisoryAuthority', $supervisoryAuthority);
}
return $this;
}
/**
* @param SupervisoryAuthority $supervisoryAuthority
* @return $this
*/
public function removeSupervisoryAuthority(SupervisoryAuthority $supervisoryAuthority): self
{
if ($this->supervisoryAuthorities->contains($supervisoryAuthority)) {
$this->supervisoryAuthorities->removeElement($supervisoryAuthority);
$supervisoryAuthority->removeCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'supervisoryAuthority', $supervisoryAuthority);
}
return $this;
}
/**
* @return Collection|SocialNetwork[]
*/
public function getSocialNetworks(): Collection
{
if (!$this->socialNetworks) $this->socialNetworks = new ArrayCollection();
return $this->socialNetworks;
}
/**
* @param SocialNetwork $socialNetwork
* @return $this
*/
public function addSocialNetwork(SocialNetwork $socialNetwork): self
{
if (!$this->socialNetworks->contains($socialNetwork)) {
$this->socialNetworks[] = $socialNetwork;
$socialNetwork->setCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'socialNetwork', $socialNetwork);
}
return $this;
}
/**
* @param SocialNetwork $socialNetwork
* @return $this
*/
public function removeSocialNetwork(SocialNetwork $socialNetwork): self
{
if ($this->socialNetworks->contains($socialNetwork)) {
$this->socialNetworks->removeElement($socialNetwork);
if ($socialNetwork->getCasino() === $this) {
$socialNetwork->setCasino(null);
}
$this->addCollectionLog(LogActionEnum::REMOVE, 'socialNetwork', $socialNetwork);
}
return $this;
}
/**
* @return Collection|Url[]
*/
public function getUrls(): Collection
{
return $this->urls;
}
/**
* @param Url $url
* @return $this
*/
public function addUrl(Url $url): self
{
if (!$this->urls->contains($url)) {
$this->urls[] = $url;
$url->setCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'url', $url);
}
return $this;
}
/**
* @param Url $url
* @return $this
*/
public function removeUrl(Url $url): self
{
if ($this->urls->contains($url)) {
$this->urls->removeElement($url);
if ($url->getCasino() === $this) {
$url->setCasino(null);
}
$this->addCollectionLog(LogActionEnum::REMOVE, 'url', $url);
}
return $this;
}
/**
* @return Collection|NewBonus[]
*/
public function getNewBonuses(): Collection
{
return $this->newBonuses;
}
/**
* @param NewBonus $newBonus
* @return $this
*/
public function addNewBonus(NewBonus $newBonus): self
{
if (!$this->newBonuses->contains($newBonus)) {
$this->newBonuses[] = $newBonus;
$newBonus->setCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'newBonus', $newBonus);
}
return $this;
}
/**
* @param NewBonus $newBonus
* @return $this
*/
public function removeNewBonus(NewBonus $newBonus): self
{
if ($this->newBonuses->contains($newBonus)) {
$this->newBonuses->removeElement($newBonus);
if ($newBonus->getCasino() === $this) {
$newBonus->setCasino(null);
}
$this->addCollectionLog(LogActionEnum::REMOVE, 'newBonus', $newBonus);
}
return $this;
}
/**
* @return Collection|Review[]
*/
public function getReviews(): Collection
{
return $this->reviews;
}
/**
* @param Review $review
* @return $this
*/
public function addReview(Review $review): self
{
if (!$this->reviews->contains($review)) {
$this->reviews[] = $review;
$review->setCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'review', $review);
}
return $this;
}
/**
* @param Review $review
* @return $this
*/
public function removeReview(Review $review): self
{
if ($this->reviews->contains($review)) {
$this->reviews->removeElement($review);
if ($review->getCasino() === $this) {
$review->setCasino(null);
}
$this->addCollectionLog(LogActionEnum::REMOVE, 'review', $review);
}
return $this;
}
/**
* @return Collection|Logo[]
*/
public function getLogos(): Collection
{
return $this->logos;
}
/**
* @param Logo $logo
* @return $this
*/
public function addLogo(Logo $logo): self
{
if (!$this->logos->contains($logo)) {
$this->logos[] = $logo;
$logo->setCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'logo', $logo);
}
return $this;
}
/**
* @param Logo $logo
* @return $this
*/
public function removeLogo(Logo $logo): self
{
if ($this->logos->contains($logo)) {
$this->logos->removeElement($logo);
if ($logo->getCasino() === $this) {
$logo->setCasino(null);
}
$this->addCollectionLog(LogActionEnum::REMOVE, 'logo', $logo);
}
return $this;
}
/**
* @return Collection|Visit[]
*/
public function getVisits(): Collection
{
return $this->visits;
}
/**
* @param Visit $visit
* @return $this
*/
public function addVisit(Visit $visit): self
{
if (!$this->visits->contains($visit)) {
$this->visits[] = $visit;
$visit->setCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'visit', $visit);
}
return $this;
}
/**
* @param Visit $visit
* @return $this
*/
public function removeVisit(Visit $visit): self
{
if ($this->visits->contains($visit)) {
$this->visits->removeElement($visit);
if ($visit->getCasino() === $this) {
$visit->setCasino(null);
}
$this->addCollectionLog(LogActionEnum::REMOVE, 'visit', $visit);
}
return $this;
}
/**
* @return Collection|ProsAndCons[]
*/
public function getProsAndCons(): Collection
{
return $this->prosAndCons;
}
/**
* @param ProsAndCons $prosAndCons
* @return $this
*/
public function addProsAndCons(ProsAndCons $prosAndCons): self
{
if (!$this->prosAndCons->contains($prosAndCons)) {
$this->prosAndCons[] = $prosAndCons;
$prosAndCons->setCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'prosAndCons', $prosAndCons);
}
return $this;
}
/**
* @param ProsAndCons $prosAndCons
* @return $this
*/
public function removeProsAndCons(ProsAndCons $prosAndCons): self
{
if ($this->prosAndCons->contains($prosAndCons)) {
$this->prosAndCons->removeElement($prosAndCons);
if ($prosAndCons->getCasino() === $this) {
$prosAndCons->setCasino(null);
}
$this->addCollectionLog(LogActionEnum::REMOVE, 'prosAndCons', $prosAndCons);
}
return $this;
}
/**
* @return Collection|Traffic[]
*/
public function getTraffic(): Collection
{
return $this->traffic;
}
/**
* @param Traffic $traffic
* @return $this
*/
public function addTraffic(Traffic $traffic): self
{
if (!$this->traffic->contains($traffic)) {
$this->traffic[] = $traffic;
$traffic->setCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'traffic', $traffic);
}
return $this;
}
/**
* @param Traffic $traffic
* @return $this
*/
public function removeTraffic(Traffic $traffic): self
{
if ($this->traffic->contains($traffic)) {
$this->traffic->removeElement($traffic);
if ($traffic->getCasino() === $this) {
$traffic->setCasino(null);
}
$this->addCollectionLog(LogActionEnum::REMOVE, 'traffic', $traffic);
}
return $this;
}
/**
* @return Collection|Keyword[]
*/
public function getKeywords(): Collection
{
return $this->keywords;
}
/**
* @param Keyword $keyword
* @return $this
*/
public function addKeyword(Keyword $keyword): self
{
if (!$this->keywords->contains($keyword)) {
$this->keywords[] = $keyword;
$keyword->addCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'keyword', $keyword);
}
return $this;
}
/**
* @param Keyword $keyword
* @return $this
*/
public function removeKeyword(Keyword $keyword): self
{
if ($this->keywords->contains($keyword)) {
$this->keywords->removeElement($keyword);
$keyword->removeCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'keyword', $keyword);
}
return $this;
}
/**
* @return Collection|CasinoScreenshot[]
*/
public function getScreenshots(): Collection
{
return $this->casinoScreenshots;
}
/**
* @param CasinoScreenshot $screenshot
* @return $this
*/
public function addScreenshot(CasinoScreenshot $screenshot): self
{
if (!$this->casinoScreenshots->contains($screenshot)) {
$this->casinoScreenshots[] = $screenshot;
$screenshot->setCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'screenshot', $screenshot);
}
return $this;
}
/**
* @param CasinoScreenshot $screenshot
* @return $this
*/
public function removeScreenshot(CasinoScreenshot $screenshot): self
{
if ($this->casinoScreenshots->contains($screenshot)) {
$this->casinoScreenshots->removeElement($screenshot);
if ($screenshot->getCasino() === $this) {
$screenshot->setCasino(null);
}
$this->addCollectionLog(LogActionEnum::REMOVE, 'screenshot', $screenshot);
}
return $this;
}
/**
* @return Collection|SlotCasinoGeo[]
*/
public function getSlotCasinoGeo(): Collection
{
return $this->slotCasinoGeo;
}
/**
* @param SlotCasinoGeo $slotCasinoGeo
* @return $this
*/
public function addSlotCasinoGeo(SlotCasinoGeo $slotCasinoGeo): self
{
if (!$this->slotCasinoGeo->contains($slotCasinoGeo)) {
$this->slotCasinoGeo[] = $slotCasinoGeo;
$slotCasinoGeo->setCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'slotCasinoGeo', $slotCasinoGeo);
}
return $this;
}
/**
* @param SlotCasinoGeo $slotCasinoGeo
* @return $this
*/
public function removeSlotCasinoGeo(SlotCasinoGeo $slotCasinoGeo): self
{
if ($this->slotCasinoGeo->contains($slotCasinoGeo)) {
$this->slotCasinoGeo->removeElement($slotCasinoGeo);
if ($slotCasinoGeo->getCasino() === $this) {
$slotCasinoGeo->setCasino(null);
}
$this->addCollectionLog(LogActionEnum::REMOVE, 'slotCasinoGeo', $slotCasinoGeo);
}
return $this;
}
/**
* @return int|null
*/
public function getScore(): ?int
{
return $this->score;
}
/**
* @param int|null $score
* @return $this
*/
public function setScore(?int $score): self
{
$this->score = $score;
return $this;
}
/**
* @return float|null
*/
public function getNewScore(): ?float
{
return $this->newScore;
}
/**
* @param float|null $newScore
* @return $this
*/
public function setNewScore(?float $newScore): self
{
$this->newScore = $newScore;
return $this;
}
/**
* @return float|null
*/
public function getGenerosityRank(): ?float
{
return $this->generosityRank;
}
/**
* @param float|null $generosityRank
* @return $this
*/
public function setGenerosityRank(?float $generosityRank): self
{
$this->generosityRank = $generosityRank;
return $this;
}
/**
* @return int|null
*/
public function getSiteType(): ?int
{
return ($this->siteType)
? $this->siteType
: SiteTypeEnum::CASINO;
}
/**
* @param int|null $siteType
* @return $this
*/
public function setSiteType(?int $siteType): self
{
SiteTypeEnum::assertExists($siteType);
$this->siteType = $siteType;
return $this;
}
/**
* @return float
*/
public function getBrandScore(): float
{
return $this->brandScore;
}
/**
* @param float $brandScore
* @return $this
*/
public function setBrandScore(float $brandScore): self
{
$this->brandScore = $brandScore;
return $this;
}
/**
* @return array
*/
public function getDisadvantages(): array
{
if ($this->getProsAndCons()) {
$disadvantages = [];
foreach ($this->getProsAndCons() as $cons) {
if ($cons->getType() === false) $disadvantages[] = $cons->getValue();
}
return $disadvantages;
}
return [];
}
/**
* @return array
*/
public function getAdvantages(): array
{
if ($this->getProsAndCons()) {
$advantages = [];
foreach ($this->getProsAndCons() as $cons) {
if ($cons->getType() === true) $advantages[] = $cons->getValue();
}
return $advantages;
}
return [];
}
/**
* @return string|null
*/
public function getGalleryHash(): ?string
{
return $this->galleryHash;
}
/**
* @param string|null $hash
* @return $this
*/
public function setGalleryHash(?string $hash): self
{
$this->galleryHash = $hash;
return $this;
}
/**
* @return Collection|Slot[]
*/
public function getSlots(): Collection
{
return $this->slots;
}
/**
* @param Slot $slot
* @return $this
*/
public function addSlot(Slot $slot): self
{
if (!$this->slots->contains($slot)) {
$this->slots[] = $slot;
$slot->addCasino($this);
$this->addCollectionLog(LogActionEnum::ADD, 'slot', $slot);
}
return $this;
}
/**
* @param Slot $slot
* @return $this
*/
public function removeSlot(Slot $slot): self
{
if ($this->slots->contains($slot)) {
$this->slots->removeElement($slot);
$slot->removeCasino($this);
$this->addCollectionLog(LogActionEnum::REMOVE, 'slot', $slot);
}
return $this;
}
/**
* @param bool|null $value
* @return $this
*/
public function setResetScore(?bool $value = null): self
{
$this->resetScore = $value;
return $this;
}
/**
* @return bool|null
*/
public function getResetScore(): ?bool
{
return $this->resetScore;
}
/**
* @param bool $value
* @return $this
*/
public function setShowTerms(bool $value): self
{
$this->showTerms = $value;
return $this;
}
/**
* @return bool|null
*/
public function getShowTerms(): ?bool
{
return $this->showTerms;
}
/**
* @return Collection|Site[]
*/
public function getSites(): Collection
{
return $this->sites;
}
/**
* @param Site $site
* @return $this
*/
public function addSite(Site $site): self
{
if (!$this->sites->contains($site)) {
$this->sites[] = $site;
$this->addCollectionLog(LogActionEnum::ADD, 'site', $site);
}
return $this;
}
/**
* @param Site $site
* @return $this
*/
public function removeSite(Site $site): self
{
if ($this->sites->contains($site)) {
$this->sites->removeElement($site);
$this->addCollectionLog(LogActionEnum::REMOVE, 'site', $site);
}
return $this;
}
/**
* @return Collection|CasinoCategory[]
*/
public function getCasinoCategories(): Collection
{
if (!$this->casinoCategories) $this->casinoCategories = new ArrayCollection();
return $this->casinoCategories;
}
/**
* @param CasinoCategory $casinoCategory
* @return $this
*/
public function addCasinoCategory(CasinoCategory $casinoCategory): self
{
if (!$this->casinoCategories) $this->casinoCategories = new ArrayCollection();
if (!$this->casinoCategories->contains($casinoCategory)) {
$this->casinoCategories[] = $casinoCategory;
$casinoCategory->addCasino($this);
}
return $this;
}
/**
* @param CasinoCategory $casinoCategory
* @return $this
*/
public function removeCasinoCategory(CasinoCategory $casinoCategory): self
{
if ($this->casinoCategories->contains($casinoCategory)) {
$this->casinoCategories->removeElement($casinoCategory);
$casinoCategory->removeCasino($this);
}
return $this;
}
/**
* @return bool|null
*/
public function getInvertCountryFromAllowed1(): ?bool
{
return $this->invertCountryFromAllowed1;
}
/**
* @param bool|null $invertCountryFromAllowed1
* @return $this
*/
public function setInvertCountryFromAllowed1(?bool $invertCountryFromAllowed1): self
{
$this->invertCountryFromAllowed1 = $invertCountryFromAllowed1;
return $this;
}
/**
* @return bool|null
*/
public function getInvertCountryFromAllowed2(): ?bool
{
return $this->invertCountryFromAllowed2;
}
/**
* @param bool|null $invertCountryFromAllowed2
* @return $this
*/
public function setInvertCountryFromAllowed2(?bool $invertCountryFromAllowed2): self
{
$this->invertCountryFromAllowed2 = $invertCountryFromAllowed2;
return $this;
}
/**
* @return bool|null
*/
public function getInvertCountryFromRestricted(): ?bool
{
return $this->invertCountryFromRestricted;
}
/**
* @param bool|null $invertCountryFromRestricted
* @return $this
*/
public function setInvertCountryFromRestricted(?bool $invertCountryFromRestricted): self
{
$this->invertCountryFromRestricted = $invertCountryFromRestricted;
return $this;
}
/**
* @return bool|null
*/
public function getCopyCountryFromRestricted(): ?bool
{
return $this->copyCountryFromRestricted;
}
/**
* @param bool|null $copyCountryFromRestricted
* @return $this
*/
public function setCopyCountryFromRestricted(?bool $copyCountryFromRestricted): self
{
$this->copyCountryFromRestricted = $copyCountryFromRestricted;
return $this;
}
/**
* @return int|null
*/
public function getCopyRestrictedCountriesFromCasino(): ?int
{
return $this->copyRestrictedCountriesFromCasino;
}
/**
* @param int|null $copyRestrictedCountriesFromCasino
* @return $this
*/
public function setCopyRestrictedCountriesFromCasino($copyRestrictedCountriesFromCasino): self
{
if ($copyRestrictedCountriesFromCasino instanceof Casino) {
$this->copyRestrictedCountriesFromCasino = $copyRestrictedCountriesFromCasino->getId();
} elseif (is_null($copyRestrictedCountriesFromCasino) or is_int($copyRestrictedCountriesFromCasino)) {
$this->copyRestrictedCountriesFromCasino = $copyRestrictedCountriesFromCasino;
}
return $this;
}
/**
* @return string|null
*/
public function getGameTypes(): ?string
{
return $this->gameTypes;
}
/**
* @param string|null $gameTypes
* @return $this
*/
public function setGameTypes(?string $gameTypes): self
{
$this->gameTypes = $gameTypes;
return $this;
}
/**
* @return Collection
*/
public function getUsers(): Collection
{
return $this->users;
}
/**
* @param User $user
* @return $this
*/
public function addUser(User $user): self
{
if (!$this->users->contains($user)) {
$this->users[] = $user;
$user->addCasino($this);
}
return $this;
}
/**
* @param User $user
* @return $this
*/
public function removeUser(User $user): self
{
if ($this->users->contains($user)) {
$this->users->removeElement($user);
$user->removeCasino($this);
}
return $this;
}
}