Article.php 635 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace Loggable\Fixture\Document;
  3. use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. /**
  6. * @ODM\Document(collection="articles")
  7. * @Gedmo\Loggable
  8. */
  9. class Article
  10. {
  11. /** @ODM\Id */
  12. private $id;
  13. /**
  14. * @Gedmo\Versioned
  15. * @ODM\String
  16. */
  17. private $title;
  18. public function __toString()
  19. {
  20. return $this->title;
  21. }
  22. public function getId()
  23. {
  24. return $this->id;
  25. }
  26. public function setTitle($title)
  27. {
  28. $this->title = $title;
  29. }
  30. public function getTitle()
  31. {
  32. return $this->title;
  33. }
  34. }