src/CoreBundle/Entity/Video.php line 13

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use JsonSerializable;
  5. /**
  6. * @ORM\Table("video")
  7. * @ORM\Entity
  8. */
  9. class Video implements JsonSerializable
  10. {
  11. /**
  12. * @ORM\Column(type="integer")
  13. * @ORM\Id
  14. * @ORM\GeneratedValue
  15. */
  16. private int $id;
  17. /** @ORM\Column */
  18. private string $title;
  19. /** @ORM\Column */
  20. private string $url;
  21. public function getTitle(): string
  22. {
  23. return $this->title;
  24. }
  25. public function getUrl(): string
  26. {
  27. return $this->url;
  28. }
  29. public function jsonSerialize(): mixed
  30. {
  31. return [
  32. "title" => $this->title,
  33. "url" => $this->url,
  34. ];
  35. }
  36. }