1 | <?php |
||
26 | class Route extends BaseRoute implements PersistableInterface, RouteInterface, TenantAwareInterface, ArticlesCountInterface |
||
27 | { |
||
28 | use TenantAwareTrait, ArticlesCountTrait; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | protected $id; |
||
34 | |||
35 | /** |
||
36 | * @var Collection |
||
37 | */ |
||
38 | protected $articles; |
||
39 | |||
40 | /** |
||
41 | * @var RouteInterface |
||
42 | */ |
||
43 | protected $root; |
||
44 | |||
45 | /** |
||
46 | * @var RouteInterface |
||
47 | */ |
||
48 | protected $parent; |
||
49 | |||
50 | /** |
||
51 | * @var Collection|RouteInterface[] |
||
52 | */ |
||
53 | protected $children; |
||
54 | |||
55 | /** |
||
56 | * @var int |
||
57 | */ |
||
58 | protected $lft; |
||
59 | |||
60 | /** |
||
61 | * @var int |
||
62 | */ |
||
63 | protected $rgt; |
||
64 | |||
65 | /** |
||
66 | * @var int |
||
67 | */ |
||
68 | protected $level; |
||
69 | 102 | ||
70 | /** |
||
71 | 102 | * Route constructor. |
|
72 | 102 | */ |
|
73 | public function __construct() |
||
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | public function getArticles() |
||
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | */ |
||
92 | public function setArticles($articles) |
||
96 | 29 | ||
97 | /** |
||
98 | 29 | * {@inheritdoc} |
|
99 | */ |
||
100 | public function getId() |
||
104 | 6 | ||
105 | /** |
||
106 | 6 | * {@inheritdoc} |
|
107 | */ |
||
108 | public function getRouteName() |
||
112 | |||
113 | /** |
||
114 | * {@inheritdoc} |
||
115 | */ |
||
116 | public function isRoot(): bool |
||
120 | |||
121 | /** |
||
122 | * {@inheritdoc} |
||
123 | */ |
||
124 | public function getRoot(): RouteInterface |
||
128 | 29 | ||
129 | /** |
||
130 | 29 | * {@inheritdoc} |
|
131 | */ |
||
132 | public function getParent() |
||
136 | |||
137 | /** |
||
138 | * {@inheritdoc} |
||
139 | */ |
||
140 | public function setParent(RouteInterface $parent = null) |
||
144 | |||
145 | /** |
||
146 | * @return Collection|RouteInterface[] |
||
147 | */ |
||
148 | public function getChildren() |
||
152 | |||
153 | /** |
||
154 | * {@inheritdoc} |
||
155 | */ |
||
156 | public function hasChild(RouteInterface $route): bool |
||
160 | |||
161 | /** |
||
162 | * {@inheritdoc} |
||
163 | */ |
||
164 | public function addChild(RouteInterface $route) |
||
171 | |||
172 | /** |
||
173 | * {@inheritdoc} |
||
174 | */ |
||
175 | public function removeChild(RouteInterface $route) |
||
182 | |||
183 | /** |
||
184 | * {@inheritdoc} |
||
185 | */ |
||
186 | public function getLeft(): int |
||
190 | |||
191 | /** |
||
192 | * {@inheritdoc} |
||
193 | */ |
||
194 | public function setLeft(int $left) |
||
198 | |||
199 | /** |
||
200 | * {@inheritdoc} |
||
201 | */ |
||
202 | public function getRight(): int |
||
206 | |||
207 | /** |
||
208 | * @param int $right |
||
209 | */ |
||
210 | public function setRight(int $right) |
||
214 | |||
215 | /** |
||
216 | * {@inheritdoc} |
||
217 | */ |
||
218 | public function getLevel(): int |
||
222 | |||
223 | /** |
||
224 | * {@inheritdoc} |
||
225 | */ |
||
226 | public function setLevel(int $level) |
||
230 | |||
231 | /** |
||
232 | * {@inheritdoc} |
||
233 | */ |
||
234 | public function serialize() |
||
241 | |||
242 | /** |
||
243 | * {@inheritdoc} |
||
244 | */ |
||
245 | public function unserialize($serialized) |
||
252 | } |
||
253 |