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