AbstractClosure.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. namespace Gedmo\Tree\Entity\MappedSuperclass;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\MappedSuperclass
  6. */
  7. abstract class AbstractClosure
  8. {
  9. /**
  10. * @ORM\Id
  11. * @ORM\GeneratedValue
  12. * @ORM\Column(type="integer")
  13. */
  14. protected $id;
  15. /**
  16. * Mapped by listener
  17. * Visibility must be protected
  18. */
  19. protected $ancestor;
  20. /**
  21. * Mapped by listener
  22. * Visibility must be protected
  23. */
  24. protected $descendant;
  25. /**
  26. * @ORM\Column(type="integer")
  27. */
  28. protected $depth;
  29. /**
  30. * Get id
  31. *
  32. * @return integer
  33. */
  34. public function getId()
  35. {
  36. return $this->id;
  37. }
  38. /**
  39. * Set ancestor
  40. *
  41. * @param object $ancestor
  42. * @return AbstractClosure
  43. */
  44. public function setAncestor($ancestor)
  45. {
  46. $this->ancestor = $ancestor;
  47. return $this;
  48. }
  49. /**
  50. * Get ancestor
  51. *
  52. * @return object
  53. */
  54. public function getAncestor()
  55. {
  56. return $this->ancestor;
  57. }
  58. /**
  59. * Set descendant
  60. *
  61. * @param object $descendant
  62. * @return AbstractClosure
  63. */
  64. public function setDescendant($descendant)
  65. {
  66. $this->descendant = $descendant;
  67. return $this;
  68. }
  69. /**
  70. * Get descendant
  71. *
  72. * @return object
  73. */
  74. public function getDescendant()
  75. {
  76. return $this->descendant;
  77. }
  78. /**
  79. * Set depth
  80. *
  81. * @param integer $depth
  82. * @return AbstractClosure
  83. */
  84. public function setDepth($depth)
  85. {
  86. $this->depth = $depth;
  87. return $this;
  88. }
  89. /**
  90. * Get depth
  91. *
  92. * @return integer
  93. */
  94. public function getDepth()
  95. {
  96. return $this->depth;
  97. }
  98. }