src/Entity/SpeakerLink.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SpeakerLinkRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=SpeakerLinkRepository::class)
  7.  */
  8. class SpeakerLink
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=Speaker::class, inversedBy="speakerLinks")
  18.      */
  19.     private $speaker;
  20.     /**
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private $type;
  24.     /**
  25.      * @ORM\Column(type="string", length=255, nullable=true)
  26.      */
  27.     private $url;
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getSpeaker(): ?Speaker
  33.     {
  34.         return $this->speaker;
  35.     }
  36.     public function setSpeaker(?Speaker $speaker): self
  37.     {
  38.         $this->speaker $speaker;
  39.         return $this;
  40.     }
  41.     public function getType(): ?int
  42.     {
  43.         return $this->type;
  44.     }
  45.     public function setType(int $type): self
  46.     {
  47.         $this->type $type;
  48.         return $this;
  49.     }
  50.     public function getUrl(): ?string
  51.     {
  52.         return $this->url;
  53.     }
  54.     public function setUrl(?string $url): self
  55.     {
  56.         $this->url $url;
  57.         return $this;
  58.     }
  59.     public function __toString(): string
  60.     {
  61.         return (string)$this->getUrl();
  62.     }
  63. }