Article.php 1000B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. namespace ReferenceIntegrity\Fixture\Document\ManyNullify;
  3. use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
  4. /**
  5. * @ODM\Document(collection="articles")
  6. */
  7. class Article
  8. {
  9. /**
  10. * @ODM\Id
  11. */
  12. private $id;
  13. /**
  14. * @ODM\String
  15. */
  16. private $title;
  17. /**
  18. * @ODM\ReferenceOne(targetDocument="Type", simple="true", inversedBy="articles")
  19. * @var Type
  20. */
  21. private $type;
  22. /**
  23. * @return mixed
  24. */
  25. public function getId()
  26. {
  27. return $this->id;
  28. }
  29. /**
  30. * @param string $title
  31. */
  32. public function setTitle($title)
  33. {
  34. $this->title = $title;
  35. }
  36. /**
  37. * @return string
  38. */
  39. public function getTitle()
  40. {
  41. return $this->title;
  42. }
  43. /**
  44. * @param Type $type
  45. */
  46. public function setType(Type $type)
  47. {
  48. $this->type = $type;
  49. }
  50. /**
  51. * @return Type
  52. */
  53. public function getType()
  54. {
  55. return $this->type;
  56. }
  57. }