vendor/gedmo/doctrine-extensions/src/Tree/Entity/MappedSuperclass/AbstractClosure.php line 19

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Doctrine Behavioral Extensions package.
  4.  * (c) Gediminas Morkevicius <gediminas.morkevicius@gmail.com> http://www.gediminasm.org
  5.  * For the full copyright and license information, please view the LICENSE
  6.  * file that was distributed with this source code.
  7.  */
  8. namespace Gedmo\Tree\Entity\MappedSuperclass;
  9. use Doctrine\DBAL\Types\Types;
  10. use Doctrine\ORM\Mapping as ORM;
  11. /**
  12.  * @ORM\MappedSuperclass
  13.  */
  14. #[ORM\MappedSuperclass]
  15. abstract class AbstractClosure
  16. {
  17.     /**
  18.      * @var int|null
  19.      *
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="IDENTITY")
  22.      * @ORM\Column(type="integer")
  23.      */
  24.     #[ORM\Column(typeTypes::INTEGER)]
  25.     #[ORM\Id]
  26.     #[ORM\GeneratedValue(strategy'IDENTITY')]
  27.     protected $id;
  28.     /**
  29.      * Mapped by listener
  30.      * Visibility must be protected
  31.      *
  32.      * @var object|null
  33.      */
  34.     protected $ancestor;
  35.     /**
  36.      * Mapped by listener
  37.      * Visibility must be protected
  38.      *
  39.      * @var object|null
  40.      */
  41.     protected $descendant;
  42.     /**
  43.      * @var int|null
  44.      *
  45.      * @ORM\Column(type="integer")
  46.      */
  47.     #[ORM\Column(typeTypes::INTEGER)]
  48.     protected $depth;
  49.     /**
  50.      * @return int|null
  51.      */
  52.     public function getId()
  53.     {
  54.         return $this->id;
  55.     }
  56.     /**
  57.      * Set ancestor
  58.      *
  59.      * @param object $ancestor
  60.      *
  61.      * @return static
  62.      */
  63.     public function setAncestor($ancestor)
  64.     {
  65.         $this->ancestor $ancestor;
  66.         return $this;
  67.     }
  68.     /**
  69.      * Get ancestor
  70.      *
  71.      * @return object|null
  72.      */
  73.     public function getAncestor()
  74.     {
  75.         return $this->ancestor;
  76.     }
  77.     /**
  78.      * Set descendant
  79.      *
  80.      * @param object $descendant
  81.      *
  82.      * @return static
  83.      */
  84.     public function setDescendant($descendant)
  85.     {
  86.         $this->descendant $descendant;
  87.         return $this;
  88.     }
  89.     /**
  90.      * Get descendant
  91.      *
  92.      * @return object|null
  93.      */
  94.     public function getDescendant()
  95.     {
  96.         return $this->descendant;
  97.     }
  98.     /**
  99.      * Set depth
  100.      *
  101.      * @param int $depth
  102.      *
  103.      * @return static
  104.      */
  105.     public function setDepth($depth)
  106.     {
  107.         $this->depth $depth;
  108.         return $this;
  109.     }
  110.     /**
  111.      * Get depth
  112.      *
  113.      * @return int|null
  114.      */
  115.     public function getDepth()
  116.     {
  117.         return $this->depth;
  118.     }
  119. }