src/Entity/Speaker.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Config\AssetConfig;
  4. use App\Repository\SpeakerRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. /**
  12.  * @ORM\Entity(repositoryClass=SpeakerRepository::class)
  13.  * @UniqueEntity("uri")
  14.  * @ORM\HasLifecycleCallbacks()
  15.  */
  16. class Speaker
  17. {
  18.     use RemoveImageTrait;
  19.     const STATUS_NEW 0;
  20.     const STATUS_APPROVE 1;
  21.     const STATUS_REJECT 2;
  22.     const TYPE_COMPANY 1;
  23.     const TYPE_PERSON 2;
  24.     /**
  25.      * @ORM\Id
  26.      * @ORM\GeneratedValue
  27.      * @ORM\Column(type="integer")
  28.      */
  29.     private $id;
  30.     /**
  31.      * @Gedmo\Slug(fields={"firstName", "lastName"})
  32.      * @ORM\Column(type="string", length=255, unique=true)
  33.      * @Assert\NotBlank()
  34.      * @Assert\Regex(pattern="/^[a-z\d\-]+$/", htmlPattern="^[a-zA-Z]+$")
  35.      */
  36.     private $uri;
  37.     /**
  38.      * @ORM\Column(type="integer")
  39.      */
  40.     private $type self::TYPE_COMPANY;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      */
  44.     private $photo;
  45.     /**
  46.      * @ORM\Column(type="string", length=255, nullable=true)
  47.      */
  48.     private $photoWide;
  49.     /**
  50.      * @ORM\Column(type="string", length=255, nullable=true)
  51.      */
  52.     private $photoBackground;
  53.     /**
  54.      * @ORM\Column(type="string", length=255, nullable=true)
  55.      */
  56.     private $photoAvatar;
  57.     /**
  58.      * @ORM\Column(type="boolean")
  59.      */
  60.     private $premium false;
  61.     /**
  62.      * @ORM\Column(type="string", length=255, nullable=true)
  63.      */
  64.     private $font;
  65.     /**
  66.      * @ORM\Column(type="text", nullable=true)
  67.      */
  68.     private $shortDescription;
  69.     /**
  70.      * @ORM\Column(type="float")
  71.      */
  72.     private $rating 0;
  73.     /**
  74.      * @ORM\Column(type="integer")
  75.      */
  76.     private $ratingVote 0;
  77.     /**
  78.      * @ORM\Column(type="integer")
  79.      */
  80.     private $position 0;
  81.     /**
  82.      * @ORM\Column(type="boolean")
  83.      */
  84.     private $inTopBanner false;
  85.     /**
  86.      * @ORM\ManyToMany(targetEntity=Category::class, inversedBy="speakers")
  87.      */
  88.     private $categories;
  89.     /**
  90.      * @ORM\ManyToMany(targetEntity=Badge::class, inversedBy="speakers")
  91.      */
  92.     private $badges;
  93.     /**
  94.      * @ORM\Column(type="datetime", nullable=true)
  95.      */
  96.     private $created;
  97.     /**
  98.      * @ORM\Column(type="boolean")
  99.      */
  100.     private $isNewFace false;
  101.     /**
  102.      * @ORM\Column(type="text", nullable=true)
  103.      */
  104.     private $description;
  105.     /**
  106.      * @ORM\ManyToOne(targetEntity=MediaObject::class, cascade={"persist", "remove"})
  107.      */
  108.     private $promoVideo;
  109.     /**
  110.      * @ORM\OneToMany(targetEntity=SpeakerLink::class, mappedBy="speaker", cascade={"persist", "remove"})
  111.      */
  112.     private $speakerLinks;
  113.     /**
  114.      * @ORM\Column(type="boolean")
  115.      */
  116.     private $enabled false;
  117.     /**
  118.      * @ORM\ManyToMany(targetEntity=User::class, inversedBy="subscribedToSpeakers")
  119.      */
  120.     private $subscribers;
  121.     /**
  122.      * @ORM\OneToMany(targetEntity=Review::class, mappedBy="speaker", orphanRemoval=true)
  123.      * @ORM\OrderBy({"date" = "DESC"})
  124.      */
  125.     private $reviews;
  126.     /**
  127.      * @ORM\OneToMany(targetEntity=SpeakerCourse::class, mappedBy="speaker", orphanRemoval=true)
  128.      */
  129.     private $courses;
  130.     /**
  131.      * @ORM\OneToMany(targetEntity=SpeakerConsultation::class, mappedBy="speaker", orphanRemoval=true)
  132.      */
  133.     private $consultations;
  134.     /**
  135.      * @ORM\OneToOne(targetEntity=User::class, inversedBy="speaker", cascade={"persist"})
  136.      */
  137.     private $user;
  138.     /**
  139.      * @ORM\OneToMany(targetEntity=PromoCode::class, mappedBy="speaker")
  140.      */
  141.     private $promoCodes;
  142.     /**
  143.      * @ORM\Column(type="text", nullable=true)
  144.      */
  145.     private $keywords;
  146.     /**
  147.      * @ORM\OneToMany(targetEntity=SpeakerCharity::class, mappedBy="speaker", orphanRemoval=true, cascade={"persist", "remove"})
  148.      */
  149.     private $charities;
  150.     /**
  151.      * @ORM\Column(type="string", length=255, nullable=true)
  152.      */
  153.     private $paymentReceiver;
  154.     /**
  155.      * @ORM\Column(type="string", length=255, nullable=true)
  156.      */
  157.     private $paymentIban;
  158.     /**
  159.      * @ORM\Column(type="string", length=255, nullable=true)
  160.      */
  161.     private $paymentIpn;
  162.     /**
  163.      * @ORM\Column(type="string", length=255, nullable=true)
  164.      */
  165.     private $paymentBank;
  166.     /**
  167.      * @ORM\Column(type="string", length=255, nullable=true)
  168.      */
  169.     private $paymentBic;
  170.     /**
  171.      * @ORM\Column(type="string", length=255, nullable=true)
  172.      */
  173.     private $paymentOkpo;
  174.     /**
  175.      * @ORM\Column(type="string", length=255, nullable=true)
  176.      */
  177.     private $personPaymentPhone;
  178.     /**
  179.      * @ORM\Column(type="string", length=255, nullable=true)
  180.      */
  181.     private $personPaymentCard;
  182.     /**
  183.      * @ORM\Column(type="string", length=255, nullable=true)
  184.      */
  185.     private $personPaymentBank;
  186.     /**
  187.      * @ORM\Column(type="json", nullable=true)
  188.      */
  189.     private $premiumDetail = [];
  190.     /**
  191.      * @ORM\Column(type="datetime", nullable=true)
  192.      */
  193.     private $topBannerExpired;
  194.     /**
  195.      * @ORM\Column(type="datetime", nullable=true)
  196.      */
  197.     private $premiumExpired;
  198.     /**
  199.      * @ORM\Column(type="string", length=255)
  200.      */
  201.     private $tcLogin '';
  202.     /**
  203.      * @ORM\Column(type="string", length=255)
  204.      */
  205.     private $tcPass '';
  206.     /**
  207.      * @ORM\Column(type="integer")
  208.      */
  209.     private $status self::STATUS_NEW;
  210.     private $nearestDate;
  211.     /**
  212.      * @ORM\PostRemove()
  213.      */
  214.     public function postRemoveEvent()
  215.     {
  216.         $this->removeImage($this->getPhoto());
  217.         $this->removeImage($this->getPhotoWide());
  218.         $this->removeImage($this->getPhotoBackground());
  219.         $this->removeImage($this->getPhotoAvatar());
  220.         // Remove promo video
  221.         $this->removeImage($this->getPromoVideo(), AssetConfig::VIDEO_UPLOAD_DIR);
  222.     }
  223.     public function __construct()
  224.     {
  225.         $this->uri uniqid();
  226.         $this->categories = new ArrayCollection();
  227.         $this->badges = new ArrayCollection();
  228.         $this->created = new \DateTime();
  229.         $this->speakerLinks = new ArrayCollection();
  230.         $this->subscribers = new ArrayCollection();
  231.         $this->reviews = new ArrayCollection();
  232.         $this->courses = new ArrayCollection();
  233.         $this->consultations = new ArrayCollection();
  234.         $this->promoCodes = new ArrayCollection();
  235.         $this->charities = new ArrayCollection();
  236.     }
  237.     public function getId(): ?int
  238.     {
  239.         return $this->id;
  240.     }
  241.     public function getUri(): ?string
  242.     {
  243.         return $this->uri;
  244.     }
  245.     public function setUri(?string $uri): self
  246.     {
  247.         $this->uri = (string)$uri;
  248.         return $this;
  249.     }
  250.     public function getType(): ?int
  251.     {
  252.         return $this->type;
  253.     }
  254.     public function setType(int $type): self
  255.     {
  256.         $this->type $type;
  257.         return $this;
  258.     }
  259.     public function isCompany(): bool
  260.     {
  261.         return $this->type === self::TYPE_COMPANY;
  262.     }
  263.     public function isPerson(): bool
  264.     {
  265.         return $this->type === self::TYPE_PERSON;
  266.     }
  267.     public function getPhoto(): ?string
  268.     {
  269.         return $this->photo;
  270.     }
  271.     public function setPhoto(?string $photo): self
  272.     {
  273.         $this->photo $photo;
  274.         return $this;
  275.     }
  276.     public function getPhotoWide(): ?string
  277.     {
  278.         return $this->photoWide;
  279.     }
  280.     public function setPhotoWide(?string $photoWide): self
  281.     {
  282.         $this->photoWide $photoWide;
  283.         return $this;
  284.     }
  285.     public function getFirstName(): ?string
  286.     {
  287.         return $this->getUser() ? $this->getUser()->getFirstName() : null;
  288.     }
  289.     public function getLastName(): ?string
  290.     {
  291.         return $this->getUser() ? $this->getUser()->getLastName() : null;
  292.     }
  293.     public function getPremium(): ?bool
  294.     {
  295.         return $this->premium;
  296.     }
  297.     public function setPremium(bool $premium): self
  298.     {
  299.         $this->premium $premium;
  300.         return $this;
  301.     }
  302.     public function getFont(): ?string
  303.     {
  304.         return $this->font;
  305.     }
  306.     public function setFont(?string $font): self
  307.     {
  308.         $this->font $font;
  309.         return $this;
  310.     }
  311.     public function getShortDescription(): ?string
  312.     {
  313.         return $this->shortDescription;
  314.     }
  315.     public function setShortDescription(?string $shortDescription): self
  316.     {
  317.         $this->shortDescription $shortDescription;
  318.         return $this;
  319.     }
  320.     public function getRating(): ?float
  321.     {
  322.         return $this->rating;
  323.     }
  324.     public function setRating(float $rating): self
  325.     {
  326.         $this->rating $rating;
  327.         return $this;
  328.     }
  329.     public function getPosition(): ?int
  330.     {
  331.         return $this->position;
  332.     }
  333.     public function setPosition(int $position): self
  334.     {
  335.         $this->position $position;
  336.         return $this;
  337.     }
  338.     public function getInTopBanner(): ?bool
  339.     {
  340.         return $this->inTopBanner;
  341.     }
  342.     public function setInTopBanner(bool $inTopBanner): self
  343.     {
  344.         $this->inTopBanner $inTopBanner;
  345.         return $this;
  346.     }
  347.     /**
  348.      * @return Collection|Category[]
  349.      */
  350.     public function getCategories(): Collection
  351.     {
  352.         $limit $this->getPremiumDetail()->getCategoryLimit();
  353.         if ($this->categories->count() > $limit) {
  354.             return new ArrayCollection($this->categories->slice(0$limit));
  355.         }
  356.         return $this->categories;
  357.     }
  358.     public function addCategory(Category $category): self
  359.     {
  360.         if (!$this->categories->contains($category)) {
  361.             $this->categories[] = $category;
  362.         }
  363.         return $this;
  364.     }
  365.     public function removeCategory(Category $category): self
  366.     {
  367.         $this->categories->removeElement($category);
  368.         return $this;
  369.     }
  370.     /**
  371.      * @return Collection|Badge[]
  372.      */
  373.     public function getBadges(): Collection
  374.     {
  375.         return $this->badges;
  376.     }
  377.     public function addBadge(Badge $badge): self
  378.     {
  379.         if (!$this->badges->contains($badge)) {
  380.             $this->badges[] = $badge;
  381.         }
  382.         return $this;
  383.     }
  384.     public function removeBadge(Badge $badge): self
  385.     {
  386.         $this->badges->removeElement($badge);
  387.         return $this;
  388.     }
  389.     public function getRatingVote(): ?int
  390.     {
  391.         return $this->ratingVote;
  392.     }
  393.     public function setRatingVote(int $ratingVote): self
  394.     {
  395.         $this->ratingVote $ratingVote;
  396.         return $this;
  397.     }
  398.     public function getCreated(): ?\DateTimeInterface
  399.     {
  400.         return $this->created;
  401.     }
  402.     public function setCreated(?\DateTimeInterface $created): self
  403.     {
  404.         $this->created $created;
  405.         return $this;
  406.     }
  407.     public function getIsNewFace(): ?bool
  408.     {
  409.         return $this->isNewFace;
  410.     }
  411.     public function setIsNewFace(bool $isNewFace): self
  412.     {
  413.         $this->isNewFace $isNewFace;
  414.         return $this;
  415.     }
  416.     public function getPhotoBackground(): ?string
  417.     {
  418.         return $this->photoBackground;
  419.     }
  420.     public function setPhotoBackground(?string $photoBackground): self
  421.     {
  422.         $this->photoBackground $photoBackground;
  423.         return $this;
  424.     }
  425.     public function getDescription(): ?string
  426.     {
  427.         return $this->description;
  428.     }
  429.     public function setDescription(?string $description): self
  430.     {
  431.         $this->description $description;
  432.         return $this;
  433.     }
  434.     public function getPromoVideo(): ?MediaObject
  435.     {
  436.         return $this->promoVideo;
  437.     }
  438.     public function setPromoVideo(?MediaObject $promoVideo): self
  439.     {
  440.         $this->promoVideo $promoVideo;
  441.         return $this;
  442.     }
  443.     /**
  444.      * @return Collection|SpeakerLink[]
  445.      */
  446.     public function getSpeakerLinks(): Collection
  447.     {
  448.         return $this->speakerLinks;
  449.     }
  450.     public function addSpeakerLink(SpeakerLink $speakerLink): self
  451.     {
  452.         $predicate = function ($key$element) use ($speakerLink) {
  453.             return $element->getType() === $speakerLink->getType();
  454.         };
  455.         if (!$this->speakerLinks->exists($predicate)) {
  456.             $this->speakerLinks[] = $speakerLink;
  457.             $speakerLink->setSpeaker($this);
  458.         }
  459.         return $this;
  460.     }
  461.     public function removeSpeakerLink(SpeakerLink $speakerLink): self
  462.     {
  463.         if ($this->speakerLinks->removeElement($speakerLink)) {
  464.             // set the owning side to null (unless already changed)
  465.             if ($speakerLink->getSpeaker() === $this) {
  466.                 $speakerLink->setSpeaker(null);
  467.             }
  468.         }
  469.         return $this;
  470.     }
  471.     public function getEnabled(): ?bool
  472.     {
  473.         return $this->enabled;
  474.     }
  475.     public function setEnabled(bool $enabled): self
  476.     {
  477.         $this->enabled $enabled;
  478.         return $this;
  479.     }
  480.     public function __toString(): string
  481.     {
  482.         return $this->getFirstName() . ' ' $this->getLastName();
  483.     }
  484.     /**
  485.      * @return Collection|User[]
  486.      */
  487.     public function getSubscribers(): Collection
  488.     {
  489.         return $this->subscribers;
  490.     }
  491.     public function addSubscriber(User $subscriber): self
  492.     {
  493.         if (!$this->subscribers->contains($subscriber)) {
  494.             $this->subscribers[] = $subscriber;
  495.         }
  496.         return $this;
  497.     }
  498.     public function removeSubscriber(User $subscriber): self
  499.     {
  500.         $this->subscribers->removeElement($subscriber);
  501.         return $this;
  502.     }
  503.     /**
  504.      * @return Collection|Review[]
  505.      */
  506.     public function getReviews(): Collection
  507.     {
  508.         return $this->reviews;
  509.     }
  510.     public function addReview(Review $review): self
  511.     {
  512.         if (!$this->reviews->contains($review)) {
  513.             $this->reviews[] = $review;
  514.             $review->setSpeaker($this);
  515.         }
  516.         return $this;
  517.     }
  518.     public function removeReview(Review $review): self
  519.     {
  520.         if ($this->reviews->removeElement($review)) {
  521.             // set the owning side to null (unless already changed)
  522.             if ($review->getSpeaker() === $this) {
  523.                 $review->setSpeaker(null);
  524.             }
  525.         }
  526.         return $this;
  527.     }
  528.     public function updateRating()
  529.     {
  530.         $rating 0;
  531.         $votes 0;
  532.         if ($this->getReviews()->count() > 0) {
  533.             foreach ($this->getReviews() as $review) {
  534.                 if ($review->isApproved()) {
  535.                     $rating += $review->getRating();
  536.                     $votes ++;
  537.                 }
  538.             }
  539.         }
  540.         $this->setRating($votes ? ($rating $votes) : 0)->setRatingVote($votes);
  541.         return $this;
  542.     }
  543.     /**
  544.      * @return Collection|SpeakerCourse[]
  545.      */
  546.     public function getCourses(): Collection
  547.     {
  548.         return $this->courses;
  549.     }
  550.     public function addCourse(SpeakerCourse $course): self
  551.     {
  552.         if (!$this->courses->contains($course)) {
  553.             $this->courses[] = $course;
  554.             $course->setSpeaker($this);
  555.         }
  556.         return $this;
  557.     }
  558.     public function removeCourse(SpeakerCourse $course): self
  559.     {
  560.         if ($this->courses->removeElement($course)) {
  561.             // set the owning side to null (unless already changed)
  562.             if ($course->getSpeaker() === $this) {
  563.                 $course->setSpeaker(null);
  564.             }
  565.         }
  566.         return $this;
  567.     }
  568.     /**
  569.      * @return Collection|SpeakerConsultation[]
  570.      */
  571.     public function getConsultations(): Collection
  572.     {
  573.         return $this->consultations;
  574.     }
  575.     public function addConsultation(SpeakerConsultation $consultation): self
  576.     {
  577.         if (!$this->consultations->contains($consultation)) {
  578.             $consultation->setSpeaker($this);
  579.             $this->consultations[] = $consultation;
  580.         }
  581.         return $this;
  582.     }
  583.     public function removeConsultation(SpeakerConsultation $consultation): self
  584.     {
  585.         if ($this->consultations->removeElement($consultation)) {
  586.             // set the owning side to null (unless already changed)
  587.             if ($consultation->getSpeaker() === $this) {
  588.                 $consultation->setSpeaker(null);
  589.             }
  590.         }
  591.         return $this;
  592.     }
  593.     public function getUser(): ?User
  594.     {
  595.         return $this->user;
  596.     }
  597.     public function setUser(?User $user): self
  598.     {
  599.         $this->user $user;
  600.         return $this;
  601.     }
  602.     /**
  603.      * @return Collection|PromoCode[]
  604.      */
  605.     public function getPromoCodes(): Collection
  606.     {
  607.         return $this->promoCodes;
  608.     }
  609.     public function addPromoCode(PromoCode $promoCode): self
  610.     {
  611.         if (!$this->promoCodes->contains($promoCode)) {
  612.             $this->promoCodes[] = $promoCode;
  613.             $promoCode->setSpeaker($this);
  614.         }
  615.         return $this;
  616.     }
  617.     public function removePromoCode(PromoCode $promoCode): self
  618.     {
  619.         if ($this->promoCodes->removeElement($promoCode)) {
  620.             // set the owning side to null (unless already changed)
  621.             if ($promoCode->getSpeaker() === $this) {
  622.                 $promoCode->setSpeaker(null);
  623.             }
  624.         }
  625.         return $this;
  626.     }
  627.     public function getKeywords(): ?string
  628.     {
  629.         return $this->keywords;
  630.     }
  631.     public function setKeywords(?string $keywords): self
  632.     {
  633.         $this->keywords $keywords;
  634.         return $this;
  635.     }
  636.     /**
  637.      * @return Collection|SpeakerCharity[]
  638.      */
  639.     public function getCharities(): Collection
  640.     {
  641.         return $this->charities;
  642.     }
  643.     public function addCharity(SpeakerCharity $charity): self
  644.     {
  645.         $predicate = function ($key$element) use ($charity) {
  646.             return $element->getCharity()->getId() == $charity->getCharity()->getId();
  647.         };
  648.         if (!$this->charities->exists($predicate)) {
  649.             $this->charities[] = $charity;
  650.             $charity->setSpeaker($this);
  651.         }
  652.         return $this;
  653.     }
  654.     public function removeCharity(SpeakerCharity $charity): self
  655.     {
  656.         if ($this->charities->removeElement($charity)) {
  657.             // set the owning side to null (unless already changed)
  658.             if ($charity->getSpeaker() === $this) {
  659.                 $charity->setSpeaker(null);
  660.             }
  661.         }
  662.         return $this;
  663.     }
  664.     public function getPhotoAvatar(): ?string
  665.     {
  666.         return $this->photoAvatar;
  667.     }
  668.     public function setPhotoAvatar(?string $photoAvatar): self
  669.     {
  670.         $this->photoAvatar $photoAvatar;
  671.         if ($this->getUser()->getAvatar() != $photoAvatar) {
  672.             $this->removeImage($this->getUser()->getAvatar());
  673.             $this->getUser()->setAvatar($photoAvatar);
  674.         }
  675.         return $this;
  676.     }
  677.     public function getPaymentReceiver(): ?string
  678.     {
  679.         return $this->paymentReceiver;
  680.     }
  681.     public function setPaymentReceiver(?string $paymentReceiver): self
  682.     {
  683.         $this->paymentReceiver $paymentReceiver;
  684.         return $this;
  685.     }
  686.     public function getPaymentIban(): ?string
  687.     {
  688.         return $this->paymentIban;
  689.     }
  690.     public function setPaymentIban(?string $paymentIban): self
  691.     {
  692.         $this->paymentIban $paymentIban;
  693.         return $this;
  694.     }
  695.     public function getPaymentIpn(): ?string
  696.     {
  697.         return $this->paymentIpn;
  698.     }
  699.     public function setPaymentIpn(?string $paymentIpn): self
  700.     {
  701.         $this->paymentIpn $paymentIpn;
  702.         return $this;
  703.     }
  704.     public function getPaymentBank(): ?string
  705.     {
  706.         return $this->paymentBank;
  707.     }
  708.     public function setPaymentBank(?string $paymentBank): self
  709.     {
  710.         $this->paymentBank $paymentBank;
  711.         return $this;
  712.     }
  713.     public function getPaymentBic(): ?string
  714.     {
  715.         return $this->paymentBic;
  716.     }
  717.     public function setPaymentBic(?string $paymentBic): self
  718.     {
  719.         $this->paymentBic $paymentBic;
  720.         return $this;
  721.     }
  722.     public function getPaymentOkpo(): ?string
  723.     {
  724.         return $this->paymentOkpo;
  725.     }
  726.     public function setPaymentOkpo(?string $paymentOkpo): self
  727.     {
  728.         $this->paymentOkpo $paymentOkpo;
  729.         return $this;
  730.     }
  731.     public function getPersonPaymentPhone(): ?string
  732.     {
  733.         return $this->personPaymentPhone;
  734.     }
  735.     public function setPersonPaymentPhone(?string $personPaymentPhone): self
  736.     {
  737.         $this->personPaymentPhone $personPaymentPhone;
  738.         return $this;
  739.     }
  740.     public function getPersonPaymentCard(): ?string
  741.     {
  742.         return $this->personPaymentCard;
  743.     }
  744.     public function setPersonPaymentCard(?string $personPaymentCard): self
  745.     {
  746.         $this->personPaymentCard $personPaymentCard;
  747.         return $this;
  748.     }
  749.     public function getPersonPaymentBank(): ?string
  750.     {
  751.         return $this->personPaymentBank;
  752.     }
  753.     public function setPersonPaymentBank(?string $personPaymentBank): self
  754.     {
  755.         $this->personPaymentBank $personPaymentBank;
  756.         return $this;
  757.     }
  758.     public function getPremiumDetail(): ?SpeakerPremiumDetail
  759.     {
  760.         return new SpeakerPremiumDetail($this->premiumDetail);
  761.     }
  762.     public function setPremiumDetail(?SpeakerPremiumDetail $premiumDetail): self
  763.     {
  764.         $this->premiumDetail is_null($premiumDetail) ? null $premiumDetail->toArray();
  765.         return $this;
  766.     }
  767.     public function getTopBannerExpired(): ?\DateTimeInterface
  768.     {
  769.         return $this->topBannerExpired;
  770.     }
  771.     public function setTopBannerExpired(?\DateTimeInterface $topBannerExpired): self
  772.     {
  773.         $this->topBannerExpired $topBannerExpired;
  774.         return $this;
  775.     }
  776.     public function getPremiumExpired(): ?\DateTimeInterface
  777.     {
  778.         return $this->premiumExpired;
  779.     }
  780.     public function setPremiumExpired(?\DateTimeInterface $premiumExpired): self
  781.     {
  782.         $this->premiumExpired $premiumExpired;
  783.         return $this;
  784.     }
  785.     public function getTcLogin(): ?string
  786.     {
  787.         return $this->tcLogin;
  788.     }
  789.     public function setTcLogin(string $tcLogin): self
  790.     {
  791.         $this->tcLogin $tcLogin;
  792.         return $this;
  793.     }
  794.     public function getTcPass(): ?string
  795.     {
  796.         return $this->tcPass;
  797.     }
  798.     public function setTcPass(string $tcPass): self
  799.     {
  800.         $this->tcPass $tcPass;
  801.         return $this;
  802.     }
  803.     public function getStatus(): ?int
  804.     {
  805.         return $this->status;
  806.     }
  807.     public function setStatus(int $status): self
  808.     {
  809.         $this->status $status;
  810.         return $this;
  811.     }
  812.     public function getNearestDate(): ?string
  813.     {
  814.         return $this->nearestDate;
  815.     }
  816.     public function setNearestDate(string $nearestDate): self
  817.     {
  818.         $this->nearestDate $nearestDate;
  819.         return $this;
  820.     }
  821. }