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
2declare( strict_types = 1 );
3
4namespace Cite\Parsoid;
5
6use Wikimedia\Parsoid\DOM\Element;
7
8/**
9 * Individual item in a {@see RefGroup}.
10 *
11 * @license GPL-2.0-or-later
12 */
13class 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 int $index = 0;
31    public string $key;
32    public string $id;
33    /** @var array<int,string> */
34    public array $linkbacks = [];
35    public string $name = '';
36    public string $target;
37
38    /** @var Element[] */
39    public array $nodes = [];
40
41    /** @var string[] */
42    public array $embeddedNodes = [];
43
44}