1 | <?php |
||
2 | |||
3 | namespace kalanis\nested_tree\Support; |
||
4 | |||
5 | class Node extends \stdClass |
||
6 | { |
||
7 | /** |
||
8 | * @var int<0, max> Current node ID |
||
9 | */ |
||
10 | public int $id = 0; |
||
11 | |||
12 | /** |
||
13 | * @var int<0, max>|null Parent node ID |
||
14 | */ |
||
15 | public ?int $parentId = null; |
||
16 | |||
17 | /** |
||
18 | * @var int<0, max> Level to get |
||
19 | */ |
||
20 | public int $level = 0; |
||
21 | |||
22 | /** |
||
23 | * @var int<0, max> Left leaf value |
||
24 | */ |
||
25 | public int $left = 0; |
||
26 | |||
27 | /** |
||
28 | * @var int<0, max> Right leaf value |
||
29 | */ |
||
30 | public int $right = 0; |
||
31 | |||
32 | /** |
||
33 | * @var int<0, max> Position inside peers |
||
34 | */ |
||
35 | public int $position = 0; |
||
36 | |||
37 | /** |
||
38 | * @var array<int<0, max>> Children of node - ids |
||
0 ignored issues
–
show
Documentation
Bug
introduced
by
![]() |
|||
39 | */ |
||
40 | public array $childrenIds = []; |
||
41 | |||
42 | /** |
||
43 | * @var array<int<0, max>, Node> Children of node - nodes |
||
0 ignored issues
–
show
|
|||
44 | */ |
||
45 | public array $childrenNodes = []; |
||
46 | } |
||
47 |