1 | <?php |
||
21 | class Route extends BaseRoute implements RouteInterface |
||
22 | { |
||
23 | use RouteTrait, ArticlesAwareTrait; |
||
24 | |||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | protected $id; |
||
29 | |||
30 | /** |
||
31 | * @var RouteInterface |
||
32 | */ |
||
33 | protected $parent; |
||
34 | |||
35 | /** |
||
36 | * @var Collection|RouteInterface[] |
||
37 | */ |
||
38 | protected $children; |
||
39 | |||
40 | /** |
||
41 | * @var int |
||
42 | */ |
||
43 | protected $lft; |
||
44 | |||
45 | /** |
||
46 | * @var int |
||
47 | */ |
||
48 | protected $rgt; |
||
49 | |||
50 | /** |
||
51 | * @var int |
||
52 | */ |
||
53 | protected $level; |
||
54 | |||
55 | /** |
||
56 | * Route constructor. |
||
57 | */ |
||
58 | public function __construct() |
||
65 | 104 | ||
66 | /** |
||
67 | 104 | * {@inheritdoc} |
|
68 | 104 | */ |
|
69 | public function getId() |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public function getRouteName() |
||
81 | |||
82 | /** |
||
83 | * @param ArticleInterface $article |
||
84 | */ |
||
85 | public function addArticle(ArticleInterface $article): void |
||
92 | 30 | ||
93 | /** |
||
94 | 30 | * {@inheritdoc} |
|
95 | */ |
||
96 | public function isRoot(): bool |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | public function getRoot(): RouteInterface |
||
108 | |||
109 | /** |
||
110 | * {@inheritdoc} |
||
111 | */ |
||
112 | public function getParent() |
||
116 | |||
117 | /** |
||
118 | * {@inheritdoc} |
||
119 | */ |
||
120 | public function setParent(RouteInterface $parent = null) |
||
124 | |||
125 | /** |
||
126 | * @return Collection|RouteInterface[] |
||
127 | */ |
||
128 | public function getChildren() |
||
132 | |||
133 | /** |
||
134 | * {@inheritdoc} |
||
135 | */ |
||
136 | public function hasChild(RouteInterface $route): bool |
||
140 | |||
141 | /** |
||
142 | * {@inheritdoc} |
||
143 | */ |
||
144 | public function addChild(RouteInterface $route) |
||
151 | |||
152 | /** |
||
153 | * {@inheritdoc} |
||
154 | */ |
||
155 | public function removeChild(RouteInterface $route) |
||
162 | |||
163 | /** |
||
164 | * {@inheritdoc} |
||
165 | */ |
||
166 | public function getLeft(): int |
||
170 | |||
171 | /** |
||
172 | * {@inheritdoc} |
||
173 | */ |
||
174 | public function setLeft(int $left) |
||
178 | |||
179 | /** |
||
180 | * {@inheritdoc} |
||
181 | */ |
||
182 | public function getRight(): int |
||
186 | |||
187 | /** |
||
188 | * @param int $right |
||
189 | */ |
||
190 | public function setRight(int $right) |
||
194 | |||
195 | /** |
||
196 | * {@inheritdoc} |
||
197 | */ |
||
198 | public function getLevel(): int |
||
202 | |||
203 | /** |
||
204 | * {@inheritdoc} |
||
205 | */ |
||
206 | public function setLevel(int $level) |
||
210 | |||
211 | /** |
||
212 | * {@inheritdoc} |
||
213 | */ |
||
214 | public function getParentId() |
||
220 | |||
221 | public function __toString() |
||
225 | } |
||
226 |