Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
RefGroupItem | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
1 | <?php |
2 | declare( strict_types = 1 ); |
3 | |
4 | namespace Cite\Parsoid; |
5 | |
6 | use Wikimedia\Parsoid\DOM\Element; |
7 | |
8 | /** |
9 | * Individual item in a {@see RefGroup}. |
10 | * |
11 | * @license GPL-2.0-or-later |
12 | */ |
13 | class RefGroupItem { |
14 | |
15 | /** |
16 | * Pointer to the contents of the ref, accessible with the |
17 | * {@see ParsoidExtensionAPI::getContentDOM}, to be used when serializing the references group. |
18 | * It gets set when extracting the ref from a node and not $missingContent. Note that that |
19 | * might not be the first one for named refs. Also, for named refs, it's used to detect |
20 | * multiple conflicting definitions. |
21 | */ |
22 | public ?string $contentId = null; |
23 | |
24 | /** Just used for comparison when we have multiples */ |
25 | public ?string $cachedHtml = null; |
26 | |
27 | public string $dir = ''; |
28 | public string $group = ''; |
29 | public int $groupIndex = 1; |
30 | public ?string $extendsRef = null; |
31 | public int $index = 0; |
32 | public string $key; |
33 | public string $id; |
34 | /** @var array<int,string> */ |
35 | public array $linkbacks = []; |
36 | public string $name = ''; |
37 | public string $target; |
38 | |
39 | /** @var Element[] */ |
40 | public array $nodes = []; |
41 | |
42 | /** @var string[] */ |
43 | public array $embeddedNodes = []; |
44 | |
45 | } |