File.php 883 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace Translatable\Fixture;
  3. use Gedmo\Mapping\Annotation as Gedmo;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity
  7. * @ORM\InheritanceType("JOINED")
  8. * @ORM\DiscriminatorColumn(name="discriminator", type="string")
  9. * @ORM\DiscriminatorMap({"file" = "File", "image" = "Image"})
  10. */
  11. class File
  12. {
  13. /**
  14. * @ORM\Id
  15. * @ORM\GeneratedValue
  16. * @ORM\Column(type="integer")
  17. */
  18. private $id;
  19. /**
  20. * @Gedmo\Translatable
  21. * @ORM\Column(length=128)
  22. */
  23. private $name;
  24. /**
  25. * @ORM\Column(type="integer")
  26. */
  27. private $size;
  28. public function setName($name)
  29. {
  30. $this->name = $name;
  31. }
  32. public function getName()
  33. {
  34. return $this->name;
  35. }
  36. public function setSize($size)
  37. {
  38. $this->size = $size;
  39. }
  40. public function getSize()
  41. {
  42. return $this->size;
  43. }
  44. }