Article.php 476 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Test\Fixture\Document;
  3. use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
  4. /**
  5. * @ODM\Document
  6. */
  7. class Article
  8. {
  9. /**
  10. * @ODM\Id
  11. */
  12. private $id;
  13. /**
  14. * @ODM\Field(type="string")
  15. */
  16. private $title;
  17. public function getId()
  18. {
  19. return $this->id;
  20. }
  21. public function setTitle($title)
  22. {
  23. $this->title = $title;
  24. }
  25. public function getTitle()
  26. {
  27. return $this->title;
  28. }
  29. }