Debian Codegraph @

extensions/DiscussionTools/includes/ThreadItem/ThreadItem.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Extension\DiscussionTools\ThreadItem;
4
5 /**
6 * A thread item, either a heading or a comment
7 */
8 interface ThreadItem {
9 /**
10 * @return string Thread ID
11 */
12 public function getId(): string;
13
14 /**
15 * @return string Thread item name
16 */
17 public function getName(): string;
18
19 /**
20 * @return string Thread item type
21 */
22 public function getType(): string;
23
24 /**
25 * @return ThreadItem|null Parent thread item
26 */
27 public function getParent(): ?ThreadItem;
28
29 /**
30 * @return ThreadItem[] Replies to this thread item
31 */
32 public function getReplies(): array;
33
34 /**
35 * @return string|bool `false` if this item is not transcluded. A string if it's transcluded
36 * from a single page (the page title, in text form with spaces). `true` if it's transcluded, but
37 * we can't determine the source.
38 */
39 public function getTranscludedFrom();
40
41 /**
42 * @return int Indentation level
43 */
44 public function getLevel(): int;
45
46 /**
47 * @param bool $deep Whether to include full serialized comments in the replies key
48 * @param callable|null $callback Function to call on the returned serialized array, which
49 * will be passed into the serialized replies as well if $deep is used
50 * @return array JSON-serializable array
51 */
52 public function jsonSerialize( bool $deep = false, ?callable $callback = null ): array;
53 }