| 1 | <?php |
||
| 7 | class NodeInfo |
||
| 8 | { |
||
| 9 | private $id; |
||
| 10 | private $parentId; |
||
| 11 | private $level; |
||
| 12 | private $left; |
||
| 13 | private $right; |
||
| 14 | private $scope; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param null|int|string $id |
||
| 18 | * @param null|int|string $parentId |
||
| 19 | * @param int $level |
||
| 20 | * @param int $left |
||
| 21 | * @param int $right |
||
| 22 | * @param null|int|string $scope If scope is not used |
||
| 23 | */ |
||
| 24 | public function __construct($id, $parentId, int $level, int $left, int $right, $scope) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return null|int|string |
||
| 36 | */ |
||
| 37 | public function getId() |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return null|int|string |
||
| 44 | */ |
||
| 45 | public function getParentId() |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param int $level |
||
| 52 | */ |
||
| 53 | public function setLevel($level): void |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return int |
||
| 60 | */ |
||
| 61 | public function getLevel(): int |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @param int $left |
||
| 68 | */ |
||
| 69 | public function setLeft($left): void |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return int |
||
| 76 | */ |
||
| 77 | public function getLeft(): int |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @param int $right |
||
| 84 | */ |
||
| 85 | public function setRight($right): void |
||
| 89 | |||
| 90 | /** |
||
| 91 | * @return int |
||
| 92 | */ |
||
| 93 | public function getRight(): int |
||
| 97 | |||
| 98 | /** |
||
| 99 | * @return null|int|string |
||
| 100 | */ |
||
| 101 | public function getScope() |
||
| 105 | |||
| 106 | /** |
||
| 107 | * @return bool |
||
| 108 | */ |
||
| 109 | public function isRoot(): bool |
||
| 117 | } |
||
| 118 |