EntityTags.php 763B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace Muzich\CoreBundle\Document;
  3. use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
  4. /**
  5. * @MongoDB\MappedSuperclass
  6. */
  7. class EntityTags
  8. {
  9. const TYPE_USER = 'User';
  10. const TYPE_GROUP = 'Group';
  11. const TYPE_PLAYLIST = 'Playlist';
  12. /**
  13. * @MongoDB\Id
  14. */
  15. protected $id;
  16. /**
  17. * @MongoDB\Int
  18. * @MongoDB\Index(unique=true)
  19. */
  20. protected $ref;
  21. /**
  22. * @MongoDB\Collection
  23. */
  24. protected $tags;
  25. public function getId()
  26. {
  27. return $this->id;
  28. }
  29. public function getRef()
  30. {
  31. return $this->ref;
  32. }
  33. public function setRef($ref)
  34. {
  35. $this->ref = (int)$ref;
  36. }
  37. public function getTags()
  38. {
  39. return $this->tags;
  40. }
  41. public function setTags($tags)
  42. {
  43. $this->tags = $tags;
  44. }
  45. }