1 | <?php |
||
23 | class Posting implements PostingInterface |
||
24 | { |
||
25 | |||
26 | use BasicPostingTrait; |
||
27 | use UserPostingTrait; |
||
28 | |||
29 | protected $_children = []; |
||
30 | |||
31 | /** |
||
32 | * Distance to root in tree |
||
33 | * |
||
34 | * @var int |
||
35 | */ |
||
36 | protected $_level; |
||
37 | |||
38 | protected $_rawData; |
||
39 | |||
40 | protected $_Thread; |
||
41 | |||
42 | /** |
||
43 | * Constructor. |
||
44 | * |
||
45 | * @param array $rawData raw posting data |
||
46 | * @param array $options options |
||
47 | * @param null|Thread $tree thread |
||
48 | */ |
||
49 | public function __construct( |
||
73 | |||
74 | /** |
||
75 | * {@inheritDoc} |
||
76 | */ |
||
77 | public function get($var) |
||
90 | |||
91 | /** |
||
92 | * {@inheritDoc} |
||
93 | */ |
||
94 | public function withCurrentUser(CurrentUserInterface $CU): self |
||
103 | |||
104 | /** |
||
105 | * {@inheritDoc} |
||
106 | */ |
||
107 | public function getLevel(): int |
||
111 | |||
112 | /** |
||
113 | * {@inheritDoc} |
||
114 | */ |
||
115 | public function getChildren() |
||
119 | |||
120 | /** |
||
121 | * {@inheritDoc} |
||
122 | */ |
||
123 | public function getAllChildren() |
||
135 | |||
136 | /** |
||
137 | * {@inheritDoc} |
||
138 | */ |
||
139 | public function toArray() |
||
143 | |||
144 | /** |
||
145 | * {@inheritDoc} |
||
146 | */ |
||
147 | public function getThread() |
||
151 | |||
152 | /** |
||
153 | * {@inheritDoc} |
||
154 | */ |
||
155 | public function hasAnswers() |
||
159 | |||
160 | /** |
||
161 | * {@inheritDoc} |
||
162 | */ |
||
163 | public function map(callable $callback, bool $mapSelf = true, $node = null): void |
||
175 | |||
176 | /** |
||
177 | * {@inheritDoc} |
||
178 | */ |
||
179 | public function addDecorator(callable $fct) |
||
192 | |||
193 | /** |
||
194 | * Attach all children recursively |
||
195 | * |
||
196 | * @return void |
||
197 | */ |
||
198 | protected function _attachChildren() |
||
211 | } |
||
212 |